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

Cheeky Code

Status
Not open for further replies.

Wazz

Technical User
Aug 12, 2002
209
GB
Hi everyone,
I need some help. I have a form, and on that form is a feild that contains a date. My database is built around this date feild. what im after is a peice of code (thats the cheeky bit) that, when I type in the date into the date feild, it brings up all the other feilds (in the same form) that have already been put added to that date.

Example... If some had a table with two feilds one called Date and one called Order.
I would want to type in the date in a form, and it automatically bring up the data within the field 'Order' if a value has been set... I was told to use the Afterupdate event, but not sure what code I need.

Cheers guys
 
Hi Wazz

Yes you can add Information using a query, as well as edit.

another way would be, after you create the query, you can create a form based on the query, and add a command button to add a new record.

Or you Create an add form and then use a combo box to Search for and existing date. either way you can update the information in the database. I am looking to see how to update the record without shutting it down and starting again. I will let you know what I find out.



Ritec

 
Hi Guys,
Sorry ive not been on to reply, but my powerpack has blown on my home pc :(

simmsey, yes thats correct (first paragraph),
qoute, "If I understand correctly you want to enter a value and then lookup that value to see if already in table, in which case get the other fields for editing OR if not already in existence to go to a new record.
I am assuming that when you lookup the entered value there can be only one match?"

Thats correct and also there can ony be one match. I havent really looked at subforms... If I get a chance today whiole at work, I will have a go.

RITEC, thanks for your efforts!! I look forward to your response! ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top