Launching a Form from Within a Form to Create a New Record

N

nytwodees

I am using Access 2000.

I tried posting this problem under Access Forms Coding but did not receive
satisfactory replies to resolution.

My Customer Work Order Form gets info from 3 tables:

Table---------tbl1CustInfo----------tbl2CustWO----------tbl3CustFUP

Linked Fields----- ID----------- CustomerWorkID------ CustomerFollowUpID

Relationship--(1 to Many Relationship)-------- (1 to Many Relationship)

Other Fields------ LastName-----WorkOrderID -----------FollowUpDate
Other Fields------ FirstName----JobLocation----------- FollowUpRemark
Other Fields------ etc.-------------- etc.------------------- etc.

I have created a query that includes fields from each of the 3 tables
indicated above. This query is used as the record source for my Work Order
Form's (Main form plus 2 sub-forms).

I have a control button on my Customer Info Form that launches the Customer
Work Order Form. The Main part of the form should be populated with the ID,
LastName, FirstName, etc. from the Customer Order Form automatically. The
remaining 2 subforms are for user input.

How can I accomplish launching a form from my current form to create a new
record that contains some info from the original form? Please be as clear as
possible since I am not a VBA expert. I know there are other ways to
accomplish this task, but I prefer to do it as I have described.
 
J

Jim Bunton

Assuming that it is clear on the calling form WHICH CUSTOMER yuou currently
wanting info for then place one or more labels on the form to be opened and
in the onclick event of the button opening the called form do 'something
like'
When adding the labels you'll have to put something in them like a - to
start with

after the command that opens the called form
Forms!CalledForm.label1.caption = "(" & me.id & ")" & me.FirstName & . . .
etc
Forms!CalledForm.label2.caption = whatever else you want

Shows the info as labels which has the advantage that there's no chance of
your user being able to alter them!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top