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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update a combo box based on a user input 2

Status
Not open for further replies.

adrianvasile

Technical User
Apr 3, 2006
124
US
I have a quick problem and I can't remember how to do this. Basically, I have a combo box that will list all the records from a querry. Then, on the same form i have a text box where the user enter a date. I would like to update the combo box only with those records that matches the date entered by the entered date.
Any help is appreciated.
Thank you
 
How are ya adrianvasile . . .

Base the [blue]RowSource[/blue] of the combo on a query having criteria that looks at the date textbox.

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
I tried that but it doesn't work. The textbox is a bound control to a table - would that make a difference?
 
I tried that but it doesn't work
What is the SQL code of the RowSource property of the combo ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
SELECT QRY_PO.[PDPO#], QRY_PO.PHSHDT FROM QRY_PO WHERE (((QRY_PO.PHSHDT)=[Forms]![FRM_DELIVERY_SCHEDULE]![ArivalDate])) ORDER BY QRY_PO.[PDPO#];
ArivalDate is a date field - when the user types in the new date I would like to update the PO# to reflect only the POs for that particular date only
 
In the AfterUpdate event procedure of ArivalDate:
Me![name of combo].RowSource = "SELECT [PDPO#],PHSHDT FROM QRY_PO WHERE PHSHDT=#" & Format(Me!ArivalDate, "yyyy-mm-dd") & "# ORDER BY [PDPO#]"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
adrianvasile . . .

Although you been a member since [blue]Apr 3, 2006[/blue] ... Welcome to [blue]Tek-Tips![/blue] [thumbsup2] Do have a look at one of the links at the bottom of my post. The links will help you [blue]ask better questions[/blue], get [blue]quick responses[/blue], [blue]better answers[/blue], and insite into [blue]etiquette[/blue] here in the forums. Again . . . Welcome to [blue]Tek-Tips![/blue] [thumbsup2] [blue]Its Worthy Reading![/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top