S
SurveyorinVA via AccessMonster.com
Good morning-
I am updating a small database that I wrote and before I change code I would
like to get the opinion of the experts.
The database is being utilizied in a Front End and Back End and has an open
recordset to help speed everything up. Right now when I open one of my forms,
I am utilizing the Dlookup function to populate the controls on the form.
Would there be any variation in quickness if I were to create a query and
gather the data utilizing DAO or ADO, or is this all the same?
For example right now I have this code looking up several variables:
intSurveyID = Dlookup("[SurveyID]","tblSurvey","[ClientID] = " & intClientID)
instead something like:
Set rsMyConnection = CurrentProject.Connection
rsMySFR.ActiveConnection = rsMyConnection
rsMySFR.Open mySQL
rsMySFR.MoveFirst
Do Until rsMySFR.EOF Or intTaskCount > 12
'intSFRequestNO = rsMySFR.Fields("SFRequestNo")
dtDateField = rsMySFR.Fields("DateField")
intCrewNumber = rsMySFR.Fields("CrewNumber")
dblEODTimeRegular = Format(rsMySFR.Fields("EODtimeRegular"), "#0.
00")
Any thoughts would be greatly appreciated.
Thanks,
CF
I am updating a small database that I wrote and before I change code I would
like to get the opinion of the experts.
The database is being utilizied in a Front End and Back End and has an open
recordset to help speed everything up. Right now when I open one of my forms,
I am utilizing the Dlookup function to populate the controls on the form.
Would there be any variation in quickness if I were to create a query and
gather the data utilizing DAO or ADO, or is this all the same?
For example right now I have this code looking up several variables:
intSurveyID = Dlookup("[SurveyID]","tblSurvey","[ClientID] = " & intClientID)
instead something like:
Set rsMyConnection = CurrentProject.Connection
rsMySFR.ActiveConnection = rsMyConnection
rsMySFR.Open mySQL
rsMySFR.MoveFirst
Do Until rsMySFR.EOF Or intTaskCount > 12
'intSFRequestNO = rsMySFR.Fields("SFRequestNo")
dtDateField = rsMySFR.Fields("DateField")
intCrewNumber = rsMySFR.Fields("CrewNumber")
dblEODTimeRegular = Format(rsMySFR.Fields("EODtimeRegular"), "#0.
00")
Any thoughts would be greatly appreciated.
Thanks,
CF