Re: List Box will not populate the field in the Control Source table

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Steve Schapel (schapel_at_mvps.org.ns)
Date: 12/05/04


Date: Sun, 05 Dec 2004 17:51:03 +1300

Ray,

My suggestion is to use a textbox instead of a listbox or combobox for
the FirstName and Title controls, so they therefore do not have a Row
Source property.

The Row Source property of the LastName combobox, assuming it is the
"Master Table", remains the same of course, but you need to change the
Column Count property to 3.

You are in effect using the LastName as a key field. In other words,
once you know the LastName value, you have identified the person. Once
you have identified the person, you know what their FirstName and Title
are. If you already know what their FirstName and Title are, it is
incorrect and invalid practice to store these values in yet another
table. This is the #1 reason for using a relational database programme
like Access. That's why I am suggesting you do not do it like this, and
why I suggested your FirstName and Title should be unbound controls,
which allows you to show them on the form, but not write them to the
table. Hope that makes sense. The other thing I questioned was the
wisdom of using LastName as the key. In the absence of an already
existing unique identifier in the "Master Table" (is that really what
it's called?), I would be adding an Autonumber Primary Key field to the
table, and using this as the linking field to your other table.

-- 
Steve Schapel, Microsoft Access MVP
anonymous@discussions.microsoft.com wrote:
> Thanks for the prompt reply.
> 
> The listboxes are bound. I have a master table of client 
> names, last, first and titles and I am using that data to 
> populate a table of transactions for the clients. Is 
> there a better way to do this? I have buily databases 
> before but I'm stretching a bit with this one.
> 
> I was not able to get your suggestion to work. What would 
> I put as the Row Source Type and Row Source for the 
> FirstName and Title Controls?
> 
> I hope my reply doesn't sound too disjointed. With my 
> original configuration, I am able to get the two list 
> boxes to populate with the correct data but the only way 
> to write that data to the underlying table is to click on 
> the respective boxes with my mouse. I havent been able to 
> duplicate this action in an Event Procedure. My skill is 
> very limited here. Thanks in advance.
> 


Relevant Pages

  • Re: All menu items as a collection
    ... For Each ctrl In Controls ... However, my suggestion to the OP would be to not make the menus invisible, ... property is set False instead of the Visible property). ...
    (microsoft.public.vb.general.discussion)
  • RE: combo-make some choices invisible
    ... When I try your suggestion, the "inactive" choices are totally filtered out ... the previous records where a selection ... It is possible to programatically change the row source for your combo box ... but some old records still need to display them. ...
    (microsoft.public.access.formscoding)
  • Web presentation that auto-advances
    ... When a presentation is saved as a Web page, the following controls should be ... Stops the presentation from auto-advancing and displays the first slide ... This post is a suggestion for Microsoft, ...
    (microsoft.public.powerpoint)
  • Re: Resizing a form to shrink or grow according to the controls that are added
    ... Now if anyone has a better suggestion for the form resizing I would be ... I have a form to which I add a variable number of controls. ... I suppose I could manually calculate the dimensions that the controls ... occupy and then manually set the Form's dimensions. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Access: Add "Row Source Lookup" to "Query Parameters"
    ... controls' values from within your queries (assuming you're writing an MDB ... > This post is a suggestion for Microsoft, ... To vote for this suggestion, ...
    (microsoft.public.access.queries)