L
Leslie
I have 2 forms a product change form and an ECN form, the ECN form is opened
by a comand button on the product change form using the code below. What I
am trying to do is this: bring the Product change number from that form into
the ECN form when the ECN form is opened and then also bring in the
Description, reason, and Summary into the same ECN form when opened. These
are all listed on the product change form. If I only try to to the
ProductChangeNo it will work fine, but when I try to do the others I get the
message listed below the code.
Code being used:
Private Sub OpnECNFormCMD_Click()
On Error GoTo Err_OpnECNFormCMD_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FRM_ECN_Issued"
stLinkCriteria = "[ChangeDoc]=" & Me![ProductChangeNo]
stLinkCriteria = stLinkCriteria & "[Description]=" & Me![DescribeRequest]
stLinkCriteria = stLinkCriteria & "[Reason]=" & Me![ReasonforRequest]
stLinkCriteria = stLinkCriteria & "[Summary]=" & Me![SummaryofChange]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OpnECNFormCMD_Click:
Exit Sub
Err_OpnECNFormCMD_Click:
MsgBox Err.Description
Resume Exit_OpnECNFormCMD_Click
End Sub
Error Message receiving:
Syntax error (missing operator) in query expressing
'[ChangeDoc]"=1[Description]=Add (2) 05040006 and (2) 05020017 to kit
11190011[Reason]=To provide enough screws for all inslationss of overhead
hose retrofits[Summary]=Revised BOM'
The information being shown for each of the fields is correct but I can't
tell what operator is missing or where. I'm somewhat new to writing code to
do things but I'm trying, please let me know what I've missed.
by a comand button on the product change form using the code below. What I
am trying to do is this: bring the Product change number from that form into
the ECN form when the ECN form is opened and then also bring in the
Description, reason, and Summary into the same ECN form when opened. These
are all listed on the product change form. If I only try to to the
ProductChangeNo it will work fine, but when I try to do the others I get the
message listed below the code.
Code being used:
Private Sub OpnECNFormCMD_Click()
On Error GoTo Err_OpnECNFormCMD_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FRM_ECN_Issued"
stLinkCriteria = "[ChangeDoc]=" & Me![ProductChangeNo]
stLinkCriteria = stLinkCriteria & "[Description]=" & Me![DescribeRequest]
stLinkCriteria = stLinkCriteria & "[Reason]=" & Me![ReasonforRequest]
stLinkCriteria = stLinkCriteria & "[Summary]=" & Me![SummaryofChange]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OpnECNFormCMD_Click:
Exit Sub
Err_OpnECNFormCMD_Click:
MsgBox Err.Description
Resume Exit_OpnECNFormCMD_Click
End Sub
Error Message receiving:
Syntax error (missing operator) in query expressing
'[ChangeDoc]"=1[Description]=Add (2) 05040006 and (2) 05020017 to kit
11190011[Reason]=To provide enough screws for all inslationss of overhead
hose retrofits[Summary]=Revised BOM'
The information being shown for each of the fields is correct but I can't
tell what operator is missing or where. I'm somewhat new to writing code to
do things but I'm trying, please let me know what I've missed.