G
Guest
I'm a newbie so I hope to get some help here...I have created a contact
management database:
tbl_Company: CoID (key), CoName
tbl_Product: ProductID (key), Product
Records in this table are like: ID 1-toys, ID 2-clothes, ID 3-food
tbl_CoProduct: CoID, ProductID
This table has no key. If the company carries 3 products,there are 3
records here.
I want to setup a form with 3 check boxes for products. When user checks
the box, it puts the corresponding ProductID into tbl_CoProduct.
Private Sub Check1_AfterUpdate()
If Check4.Value = True Then
Me.ProductID.Value = 1
Else
End If
End Sub
Private Sub Check2_AfterUpdate()
If Check6.Value = True Then
Me.ProductID.Value = 2
Else
End If
End Sub
I don't know why it didn't work. But my other question is, what if user
checks the box, and then uncheck it later? How do I make it remove the
record?
Thank you in advance!
management database:
tbl_Company: CoID (key), CoName
tbl_Product: ProductID (key), Product
Records in this table are like: ID 1-toys, ID 2-clothes, ID 3-food
tbl_CoProduct: CoID, ProductID
This table has no key. If the company carries 3 products,there are 3
records here.
I want to setup a form with 3 check boxes for products. When user checks
the box, it puts the corresponding ProductID into tbl_CoProduct.
Private Sub Check1_AfterUpdate()
If Check4.Value = True Then
Me.ProductID.Value = 1
Else
End If
End Sub
Private Sub Check2_AfterUpdate()
If Check6.Value = True Then
Me.ProductID.Value = 2
Else
End If
End Sub
I don't know why it didn't work. But my other question is, what if user
checks the box, and then uncheck it later? How do I make it remove the
record?
Thank you in advance!