Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linked Combo Box Problem

Status
Not open for further replies.

JerSand

Technical User
Oct 25, 2000
74
US
I posted this on the General Discussion Forum, but got only one response, so I'm re-posting here.

My task, as I understand it, is to use two combo boxes to enter data for two fields in a table. The first combo box is called "Source Reference" -- it's the titles of the documents from which the user has taken some information. The combo box list is to display distinct titles as the user adds records to the table. I have no trouble to this point -- I simply tie the combo box to a select query, add the word "distinct" at the appropriate place on the row source property, and requery after update.

Here is the problem: The user wishes the next combo box --"Source Date" (the date of the document entered in the Source Reference combo box) -- to automatically display the date if he/she selects a Source Reference that he/she has already entered. The Source Date combo box should be empty -- ready for entry of a date-- only if the Source Reference just entered was a new one.

I'm stumped, and would be grateful for any help.

Thanks.

JerSand
 
Have you considered adding the date to your SQL statement for the first combo box? Then you could make the combo box have 2 columns to display the source reference and its corresponding date. You could then have a second text box where the user could enter a date if he/she wishes to change this date. On the AfterUpdate event of the text box a requery statement could be used to display the data as changed in the combo box. Hope this helps some.
 
Thanks Orion45. Your suggestion is truly inventive, and I'll give it a try. I'm grateful.

JerSand
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top