Using transfering data into a new form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to use the double click command to create a new record in a new
field using the code below

DoCmd.OpenForm "jobdata", , , "[myUniqueField] = " & [myUniqueField]

this however seems to be looking for a matching field which does not work, I
am trying to post the line of data I double click into a form but as a new
record

For instance I look throught my customer records double click on customer
and it create a new job using the customer details - I think I am probably
over complicating this
 
Open the form without a criteria, and pass the Me!BatchID to the next form
using the OpenArgs

DoCmd.OpenForm "jobdata", , , ,acFormAdd , , Me. [myUniqueField]

On the OnLoad event of the jobdata form write the code

If Me.NewRecord And Not IsNull(Me.OpenArgs) Then
Me.myUniqueField = Me.OpenArgs
End If
 
Sorry, I mean transfering the myUniqueField field

DoCmd.OpenForm "jobdata", , , ,acFormAdd , , Me.[myUniqueField]
 
Back
Top