Y
YuXuan-ji
I'm using a form to enter data in several fields, such as the category,
product name, price, & etc. Obviously the "category" field will have repeated
values. I want to have a table, say named "Category", to collect all the
different values of Category I entered. I'm thinking at the Before/or After
update event of the form, add the following code to check if the value
entered in the "Category" field already exist in the table.
lngCount = DCount("[Category_Name]", "Category", value_entered)
If lngCount =0, this means a new value has been entered into the "Category"
field of the form. So I want to add this new value into the table "Category"..
How do I do the code for adding a new record with SQL and embedded into the
VB? Or there might another way of doing this?
product name, price, & etc. Obviously the "category" field will have repeated
values. I want to have a table, say named "Category", to collect all the
different values of Category I entered. I'm thinking at the Before/or After
update event of the form, add the following code to check if the value
entered in the "Category" field already exist in the table.
lngCount = DCount("[Category_Name]", "Category", value_entered)
If lngCount =0, this means a new value has been entered into the "Category"
field of the form. So I want to add this new value into the table "Category"..
How do I do the code for adding a new record with SQL and embedded into the
VB? Or there might another way of doing this?