Linked forms contd

M

myxmaster

I tried using this code from Arvin however I get a type mismatch
error. I thought it may be a setting in the tables however they are
both long interger.
Any ideas



Sub cmdOpen_Click()
DoCmd.OpenForm "Memo",,,,"customerid=" & Me.customerid
End Sub

On the memo form set the DefaultValue of the customerid textbox to:

=Forms!FirstFormName!customerid

Now, if there is a matching record it opens to that record, if not,
it
creates one with an id equal to the one on the calling form.
 

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