How to get id?

  • Thread starter Thread starter ssdipola
  • Start date Start date
S

ssdipola

Guest
Hi!

As first I would like to say that I'm new to this list. As second I'm also new to Access (VB) programming :)
I have a combobox which is dynamiclly field with name (text) and id (autonumber). The problem lies when I want to select a name from this combox and I want to pass this id to another combox which will show me only the results for this id. How can I do this? Should I change my queries or what? Tnx a lot!
 
Hi There, i'm also new to this forum - and newish to access (i'm more used to VB...)

The way i got round this problem was to change the query for the combobox's recordsource...if you select the id (autonumber) and the name(text) -- sort name as ascending to get them a- z ...

then... in the combobox's properties change the column count to 2 , and then change the column widths to 0,4

...this will give the 1st column a width of 0cm (invisible) so that the id (autonumber) can be used to produce more query's and the 2nd Column a width big enough to display the full name(text)...

What the user see's is the name(text), but what their actually selecting is the id(autonumber)

Hope this is what your after....

:p
 

Users who are viewing this thread

Back
Top Bottom