I have many good size applications that have been running with an access back end up until now. I am in the process of preparing the access frontends so that we can run them on the sql server 2000 back end that i have created.
I am having particular trouble with situations where myself and my team have used the autonumber in access and set variables from them in the vba. As SQL does not create these autonumbers / identity's until the record is closed.
an example is this
We have a "deliveries" table with the following fields
DELIVERYID - autonumber
DATE - date/time
DRIVER - text
When the code creates this record i set a variable (varid) from it
set rst = dbs.openrecordset("deliveries")
with rst
.adddnew
date = date()
driver = forms!etc
varid = rst!deliveryid
.update
etc
How ever this deliveryid is not set until the record is closed in SQL.
Does anyone know the best way to get the id from the table.
We have this problem in several of the apps and they are multi user. My programming knowledge is limited so take it easy on me.
Cheers
I am having particular trouble with situations where myself and my team have used the autonumber in access and set variables from them in the vba. As SQL does not create these autonumbers / identity's until the record is closed.
an example is this
We have a "deliveries" table with the following fields
DELIVERYID - autonumber
DATE - date/time
DRIVER - text
When the code creates this record i set a variable (varid) from it
set rst = dbs.openrecordset("deliveries")
with rst
.adddnew
date = date()
driver = forms!etc
varid = rst!deliveryid
.update
etc
How ever this deliveryid is not set until the record is closed in SQL.
Does anyone know the best way to get the id from the table.
We have this problem in several of the apps and they are multi user. My programming knowledge is limited so take it easy on me.
Cheers