G
Guest
The table in the database has a field called LabID. That field is an
integer and consists of the year plus a counter. For example, the
first record of 2006 would be "20060001," the second record of 2006
would be "20060002" and so on.
Originally, I tried to create an Insert trigger that could generate the
ID value when a new record is inserted. An MVP in another forum was
kind enough to help me with this trigger and it worked flawlessly.
However, the problem is the Access ADP. Basically, the trigger and and
the bound form in the ADP did not get along, and an error message
occurred every time an attempt was made to insert a new row.
Now I'm looking at a new approach. I would like to generate the value
described in the first paragraph, but in the bound form itself instead
of using a trigger. I'm sure this would require a VBA solution, but my
VBA isn't as strong as my SQL. Can anyone help me achieve this goal
listed in the first paragraph using VBA in the form?
integer and consists of the year plus a counter. For example, the
first record of 2006 would be "20060001," the second record of 2006
would be "20060002" and so on.
Originally, I tried to create an Insert trigger that could generate the
ID value when a new record is inserted. An MVP in another forum was
kind enough to help me with this trigger and it worked flawlessly.
However, the problem is the Access ADP. Basically, the trigger and and
the bound form in the ADP did not get along, and an error message
occurred every time an attempt was made to insert a new row.
Now I'm looking at a new approach. I would like to generate the value
described in the first paragraph, but in the bound form itself instead
of using a trigger. I'm sure this would require a VBA solution, but my
VBA isn't as strong as my SQL. Can anyone help me achieve this goal
listed in the first paragraph using VBA in the form?