Populating Textbox or label with a primary key

k209310

Registered User.
Local time
Today, 22:11
Joined
Aug 14, 2002
Messages
184
Hi

Yesterday i posted a question about populating a textbox or label with a primary key depending upon the results of combo selections. This post has seemed to be deleted.

I was wondering (in my original post) if it was possible to have a priamry key displayed on a form depending upon the results of three comboboxes. I was able to run a query using Docmd.RunQuery event but this didnt display the result on the actual form. Does anybody have anyideas on how to do this

My appologies if you read the original post - im not too suer what has happend to it.

Chris
 
=[MyCombo] as the control source of an unbound textbox, where you bound column of the combo contains the PK
 
Thanks for the reply.

None of my combo boxes actually contain the primary key. I have three combos which list data in the relevant table. Each one is selected by the user and then i need the relevant primary key to appear on the form. If i can help it id like to prevent the user from having to select the primary key from a list. Just have it appear.

Cheers

Chris
 
If your combos are used to feed the criteria in a query, the query will return the PK.

Is your data such that these combos will uniquely identify a single record? If so, you hardly need a primary key!
 
Its ok i have managed to do another way using VB it may not be the simplest way but it works.

Thnaks anyway

Chris
 

Users who are viewing this thread

Back
Top Bottom