troubleshooting Question

Open a form for a new record

Avatar of rltomalin
rltomalinFlag for United Kingdom of Great Britain and Northern Ireland asked on
DatabasesMicrosoft Access
5 Comments1 Solution95 ViewsLast Modified:
I have a database that has tables for Clients and Jobs (tblClients and tblJobs)

Currently working is a form to add a new job.
This form has a query that joins tblClients and tblJobs
It is called from a button on a menu form using…
stDocName = "frmNewJob"
    DoCmd.OpenForm stDocName, , , stLinkCriteria
    DoCmd.GoToRecord , , acNewRec

On this form is a field cboClient.  The user selects the Client in this combo box and it populates the client details on the form.  The user then enters the new job information and saves to create the new job.
This is all working fine and has been for ages.

Now I want to do almost the same thing, but calling a copy of the above form – frmNewJobFromEditClient from the client details form.
So when the new form is opened I want it to open as a new record but with the Client details already populated (as if the user had selected the correct client).

I assumed that I would be able to put something like…
Me.cboClient = [frmEditClient].[Client ID]
in the Open event of the frmNewJobFromEditClient form.
I have tried all sorts of options of syntax without success.

Hope someone can help me out.

Regards
Richard
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros