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

search and create new record

Status
Not open for further replies.

Joshua61679

Technical User
Dec 28, 2001
36
US
Ok, this one is way over my head,

I have a job form and a callsheet form, both connected to tables. The key for the callsheet table is a combination of three fields: Customer, Lease, and Callsheet#. I have text boxes on the job form for Customer and Lease. When I hit a command button on the job form, I need it to search callsheet for Customer and Lease, and if there is not a matching record set, then to create a new record, making the Callsheet# "1". If there is a matching record(s), then I need Callsheet# to incrament to the next number. I've got Customer and Lease moving to the new form, but the search and incrament is killing me. Any ideas?
Thanks.
Joshua R. Coffee
 
Create a new form which has the customers as the main form. Add a subform to it which is the Call sheet info.
The two forms are synced by CustomerID. So the CallSheet talbe needs the CustomerID in it.
So the Customer ID of 12345 will be added to the call sheet table when you start typing a new call sheet. Then next time just pull up that customer and there will be his calls listed in order by Date and time
DougP, MCP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top