Here's the problem.
There is a database that is saved on our company network so that all members of the network can access and update the database.
When a person needs to access the database outside of the network, he/she makes a copy of the database. The database can later be manually imported into the network database.
Right now I'm working on a module that will import the edited database. I do have a way of doing this by opening each table in a recordset and editing each field.
I was wondering if there was a way to "cut and paste" an entire record into a database using code. Example:
''''''''''''''''''''''''''''''''''''''''''
'Instead of saying the following for each table
'rst is a table in the network database
'rstimport is a table in the tmp database that will be added/updated to rst
With rst
.FindFirst "project_num = '"& prj &"'"
If .NoMatch = False Then
.Edit
!proj_name = rstimport!proj_name
!quan = rstimport!quan
!uc = rstimport!uc
.Update
End If
End With
'''''''''''''''''''''''''''''''''''
'I would like to say this and loop it for all the tables
rst.FindFirst "project_num = '"& prj &"'"
rstimport.FindFirst "project_num = '"& prj &"'"
rst = rstimport
Thanks for any help.
There is a database that is saved on our company network so that all members of the network can access and update the database.
When a person needs to access the database outside of the network, he/she makes a copy of the database. The database can later be manually imported into the network database.
Right now I'm working on a module that will import the edited database. I do have a way of doing this by opening each table in a recordset and editing each field.
I was wondering if there was a way to "cut and paste" an entire record into a database using code. Example:
''''''''''''''''''''''''''''''''''''''''''
'Instead of saying the following for each table
'rst is a table in the network database
'rstimport is a table in the tmp database that will be added/updated to rst
With rst
.FindFirst "project_num = '"& prj &"'"
If .NoMatch = False Then
.Edit
!proj_name = rstimport!proj_name
!quan = rstimport!quan
!uc = rstimport!uc
.Update
End If
End With
'''''''''''''''''''''''''''''''''''
'I would like to say this and loop it for all the tables
rst.FindFirst "project_num = '"& prj &"'"
rstimport.FindFirst "project_num = '"& prj &"'"
rst = rstimport
Thanks for any help.
