copy field to form

2ippy

Newbie Here, Be gentle.
Local time
Today, 12:34
Joined
Nov 10, 2006
Messages
78
Code:
Private Sub CreateCall_Click()
Dim Msg, Style, Title, Help, Ctxt, Response, MyString

Msg = "Do you wish to create a item for this customer?"
Style = vbYesNo + vbCritical + vbDefaultButton1
Title = "Confirm Create Item"
Help = "DEMO.HLP"
Ctxt = 1000

Response = MsgBox(Msg, Style, Title, Help, Ctxt)

If Response = vbYes Then ' User chose Yes.
    MyString = "Yes"
    DoCmd.OpenForm "FrmCustomersCreateCall", , , , acFormAdd, , Me.CustomerID
Else ' User chose No.
    MyString = "No"
End If
End Sub

Why isn't the copy customerID to the form working?

The exact same code it used on a different command button

I have no clue :(
 
you are passing CustomerID to the form you are opening as an OpenArg. It is up to the new form to do something with that info. look at the form that you open and works to see what is happening

Peter
 
thankyou i found what i didn't enter.

Code:
Private Sub Form_Load()
If Not IsNull(OpenArgs) Then
Me.CustomerID = OpenArgs
End If
End Sub
 

Users who are viewing this thread

Back
Top Bottom