DoCmd

  • Thread starter Thread starter Kim
  • Start date Start date
K

Kim

I am using the following statement to open a form
by passing values for File_num and Set_type. I am
getting erros, can someone help me please ...

DoCmd.OpenForm "DETAILS", , , _
"FILE_NUM = '" & [FILE_NUM] & " '" And SET_TYPE
= "O"" "

Thank you in advance,
-Kim
 
Hi Kim,

Your quotes around Set_Type are unbalanced and the criteria involving
Set_Type should be inside the quotes:

DoCmd.OpenForm "DETAILS", , , "FILE_NUM = '" & [FILE_NUM] & " ' And SET_TYPE
= ""O"""

or

DoCmd.OpenForm "DETAILS", , , "FILE_NUM = '" & [FILE_NUM] & " ' And SET_TYPE
= 'O'"
 
Thank you Sandra,
-Kim
-----Original Message-----
Hi Kim,

Your quotes around Set_Type are unbalanced and the criteria involving
Set_Type should be inside the quotes:

DoCmd.OpenForm "DETAILS", , , "FILE_NUM = '" & [FILE_NUM] & " ' And SET_TYPE
= ""O"""

or

DoCmd.OpenForm "DETAILS", , , "FILE_NUM = '" & [FILE_NUM] & " ' And SET_TYPE
= 'O'"

--
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.

I am using the following statement to open a form
by passing values for File_num and Set_type. I am
getting erros, can someone help me please ...

DoCmd.OpenForm "DETAILS", , , _
"FILE_NUM = '" & [FILE_NUM] & " '" And SET_TYPE
= "O"" "

Thank you in advance,
-Kim


.
 
Back
Top