macro problem

engohubby

New member
Local time
Today, 21:18
Joined
Nov 13, 2008
Messages
6
I have a button in a form that (opens another form)
with a specific value for a (customer name) field.

what I've got is a blank form with no data
please help me

my email is:engohubby@hotmail.com

:)
 
I am no expert on macros but why dont you use a click event and pass the name. If you are not looking at posistioning on a record you can use the openArgs to pass the name.

Private Sub btnCamBuild_Click()
On Error GoTo Err_btnCamBuild_Click

Dim stDocName As String
Dim stLinkCriteria As String


stDocName = "CamBuild1"
stLinkCriteria = "[CamId]=" & "'" & Me![txtCamId] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_btnCamBuild_Click:
Exit Sub

Err_btnCamBuild_Click:
MsgBox Err.Description
Resume Exit_btnCamBuild_Click

End Sub
 

Users who are viewing this thread

Back
Top Bottom