Hi,
I am using Access 2003. The code below is attached to a command button that is suppose to attach a record to the bottom of a temporary table when pressed. The table is displayed in a subform but most of the info. to be attached in the code comes from fields in the main form.
The temporary table is created when the form is opened and cleared when closed. But for some reason that I don't understand the record is inserted into various places in the temporary table everytime the command button is pressed. Sometimes it's in the beginning, middle or end. I need the fields/record to be inserted at the end of the temporary table at all times.
Is there a way of forcing it to append to the bottom of the table in the subform?
Thanks in advance.
DoCmd.RunSQL "INSERT INTO TEMPWEAPONTBL (AGENT_ID, AGENT_LAST, AGENT_FIRST, GROUP_NAME, SERIAL) VALUES (FORMS!RANGESCRENTF!AGENT_ID, FORMS!RANGESCRENTF!AGENT_LAST, FORMS!RANGESCRENTF!AGENT_FIRST, FORMS!RANGESCRENTF!GROUP_NAME, 'RANGE-ONLY')"