Results 1 to 2 of 2
2002-10-29, 16:49 #1
- Join Date
- Nov 2001
- Thanked 0 Times in 0 Posts
Criteria do not function (Access 2000)
I have a Form called FrmInventory and i want by clicking the label to open another from called FrmInventoryInExt
and to view only those product that i have chosen in the form FrmInventory. In this form i have a control TxtProductId
However on clicking the label i open the form indeed,but the form is not filrtered and i see all the productid numbers.
I open the seocnd form by way of:
Dim stDocName As String
Dim strCriteria As String
stDocName = "FrmInventoryInExt"
strCriteria = "ProductID = " & Me!TxtProductID
DoCmd.OpenForm stDocName, , , strCriteria
To my regret obvisouly the criteria seem not to be in order since they do not function.
I will be grateful for any help
2002-10-29, 20:04 #2
- Join Date
- Dec 2001
- Melbourne, Australia
- Thanked 32 Times in 32 Posts
Re: Criteria do not function (Access 2000)
If the PRoductID is a text field then enclose the Me!TxtProductID field in single quotes:
strCriteria = "ProductID = '" & Me!TxtProductID & "'"
Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>