M
Michelle
I have a main from based on tblEquipment it has a subform based on tblIPData.
On the main form I put a command button that makes the subform popup however
it is not pulling the IDTag # into the subform.
tblEquipment
IDTag - Text Primay Key
Equipment Type
Location
LocationDesc
Manufacturer
Model
SerialNum
PONum
Contract(s)
WarrantyType
WarrantyExpDate
Surplus
SurplusDate
tblIPData
ID - AutoNum Primary Key
EIDTag
MAC
IP
SN
GW
PDNS
SDNS
Wireless
Relationship is tblEquipment IDTag = tblIPData EIDTag
Code for cmd button:
Private Sub IPData_Click()
On Error GoTo Err_IPData_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmIPData"
stLinkCriteria = "[EIDTag]=" & Me![IDTag]
DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria
Forms!frmipdata!eidtag.DefaultValue = Me.IDTag
DoCmd.MoveSize 3 * 1440, 2 * 1440, 9.5 * 1440, 5 * 1440
Exit_IPData_Click:
Exit Sub
Err_IPData_Click:
MsgBox Err.Description
Resume Exit_IPData_Click
End Sub
I get the following error....
Syntax error (missing operator0 in query expression '[EIDTag]=12KZ791'.
On the main form I put a command button that makes the subform popup however
it is not pulling the IDTag # into the subform.
tblEquipment
IDTag - Text Primay Key
Equipment Type
Location
LocationDesc
Manufacturer
Model
SerialNum
PONum
Contract(s)
WarrantyType
WarrantyExpDate
Surplus
SurplusDate
tblIPData
ID - AutoNum Primary Key
EIDTag
MAC
IP
SN
GW
PDNS
SDNS
Wireless
Relationship is tblEquipment IDTag = tblIPData EIDTag
Code for cmd button:
Private Sub IPData_Click()
On Error GoTo Err_IPData_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmIPData"
stLinkCriteria = "[EIDTag]=" & Me![IDTag]
DoCmd.OpenForm stDocName, acFormDS, , stLinkCriteria
Forms!frmipdata!eidtag.DefaultValue = Me.IDTag
DoCmd.MoveSize 3 * 1440, 2 * 1440, 9.5 * 1440, 5 * 1440
Exit_IPData_Click:
Exit Sub
Err_IPData_Click:
MsgBox Err.Description
Resume Exit_IPData_Click
End Sub
I get the following error....
Syntax error (missing operator0 in query expression '[EIDTag]=12KZ791'.