Hi All,
Someone has nicely managed to kill all the VBA in an old database so I have the nice job of putting it all back in.
I need to use a where statement on a DoCmd.Openform, but I cant seem to get it right.
I know some of the field names are not great but at this stage it'd take more time to change them!
So this is using a Query in a sub form to open a record that matches a criteria (in this case part number). It the sub form returns a list and i need to open the form where the Blanket Agreement Number (on the form I'm trying to open) matches the ID1 from the query.
IN both cases its Text. The Blanket agreement is comprised of 3letters and 4 numbers.
What am I doing wrong?
Someone has nicely managed to kill all the VBA in an old database so I have the nice job of putting it all back in.
I need to use a where statement on a DoCmd.Openform, but I cant seem to get it right.
I know some of the field names are not great but at this stage it'd take more time to change them!
Code:
DoCmd.OpenForm "Frm_Shikomi_Register", , , "Blanket Agreement Number=" & Me.ID1
So this is using a Query in a sub form to open a record that matches a criteria (in this case part number). It the sub form returns a list and i need to open the form where the Blanket Agreement Number (on the form I'm trying to open) matches the ID1 from the query.
IN both cases its Text. The Blanket agreement is comprised of 3letters and 4 numbers.
What am I doing wrong?