I have a table entitled "Parts". In that table I have a field entitled "PartDoc" and four fields entitled "Product1", Product2", "Product3", and Product4". The datatype for these fields is Number (look-up). (the number represents a product)
So each record in the table could look like this.
I want to do a case statement something like this.
I don't know if this is the right approach. I am new to this as a couple of you know. And I want to thank them for the help with the combobox. I have it working thanks to thier help.
Hope you can help again. Thanks
So each record in the table could look like this.
Code:
PartID PartDoc Product1 Product2 Product3 Product4 12 P-7824 1 5 7 9
Code:
Private Sub CmdReturn5_Click() Select Case ????????? Case 1 DoCmd.OpenForm "PARTS", , , "[PRODUCT1]='5'" Case 2 DoCmd.OpenForm "PARTS", , , "[PRODUCT2]='5'" Case 3 DoCmd.OpenForm "PARTS", , , "[PRODUCT3]='5" Case 4 DoCmd.OpenForm "PARTS", , , "[PRODUCT4]='5'" Case Else MsgBox "NO DOCUMENTS FOUND" End Select Exit Sub
Hope you can help again. Thanks
Comment