Steve R.
Retired
- Local time
- Today, 12:33
- Joined
- Jul 5, 2006
- Messages
- 4,687
1. Access Queries: I tend to use access queries as the datasource for all my forms. I have started to use SQL statements to define the record source. This seems superior; however I have had a couple of lingering questions. I have often wondered if the Access queries are always active or if they are only active when called upon by an active form. If they are always active, I would assume that there would be a performance drag. Since my datadases are small, I haven't noticed anything.
2.Adding New Records: As noted in #1, I tend to have an access query that is uses all the relevant tables as the datasource and to open the form with acFormAdd. I am beginning to think that it would be better for all the controls on the form to be unbound and then to add the new record through code:
The reason that I am considering the above approach is that I have, what is now a single user database that I intend to make multiuser (Yes the database was split.) and this may minimize the database "locked" message that I have been periodically getting on an erratic basis when testing it as a multiuser database.
2.Adding New Records: As noted in #1, I tend to have an access query that is uses all the relevant tables as the datasource and to open the form with acFormAdd. I am beginning to think that it would be better for all the controls on the form to be unbound and then to add the new record through code:
Code:
Dim dbstemp As DAO.Database
Dim rsttemp As DAO.Recordset
Dim authortemp As String
Set dbstemp = CurrentDb
authortemp = "select * from authortemp"
Set rsttemp = dbstemp.OpenRecordset(authortemp, dbOpenDynaset)
rsttemp.AddNew
rsttemp![LAST] = [LASTX]
rsttemp![FIRST] = [FIRSTX]
rsttemp.Update
rsttemp.close