Would anyone be kind enough to help with what I presume is some extremely basic VBA?
I have an archive table, which is normally closed. I also have a data entry table which only ever contains one record at any time.
What I want to do in VBA is this. Use a button to add the contents of selected fields in the data entry table to a new record in the archive table
I had assumed that the procedure would be quite straightforward and would be something like this
Open the archive table in data entry mode
Then make various assignments such as
[archivetable].[surname]=[dataentrytable].[surname]
[archivetable].[address1]=[dataentrytable].[address1]
[archivetable].[tel]=[dataentrytable].[tel]
Etc etc
Save the new record in the archive table and close it
Delete the existing record in the dataentry table
Im sure that it must be very simple - but Im getting all sorts of grief trying to write VBA for a button to do this.
My problem is that I don’t use VBA often enough to be very confident about the syntax and commands - eg even simple stuff such as when and when not to use . or ! separators. And do I need to use the (full?) syntax as in [tables].[archivetable].[surname] etc
Any help will be much appreciated - thanks
I have an archive table, which is normally closed. I also have a data entry table which only ever contains one record at any time.
What I want to do in VBA is this. Use a button to add the contents of selected fields in the data entry table to a new record in the archive table
I had assumed that the procedure would be quite straightforward and would be something like this
Open the archive table in data entry mode
Then make various assignments such as
[archivetable].[surname]=[dataentrytable].[surname]
[archivetable].[address1]=[dataentrytable].[address1]
[archivetable].[tel]=[dataentrytable].[tel]
Etc etc
Save the new record in the archive table and close it
Delete the existing record in the dataentry table
Im sure that it must be very simple - but Im getting all sorts of grief trying to write VBA for a button to do this.
My problem is that I don’t use VBA often enough to be very confident about the syntax and commands - eg even simple stuff such as when and when not to use . or ! separators. And do I need to use the (full?) syntax as in [tables].[archivetable].[surname] etc
Any help will be much appreciated - thanks