Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Performance opening form 2

Status
Not open for further replies.

Niebotel

Programmer
Jan 1, 2007
169
NL
I have troubles with my performance (Some thousands records reading via the network)
I want to open a form to add a new record. So I use:
DoCmd.GoToRecord , "", acNewRec on the open event.

Although I do not need all the records on that moment the system seems to get all the records because I have to wait a while. (12 seconds)

What can I do to improve the performace; is there for instance a way to first open the form for adding a new record and actually reading the others in background. Of another trick??
 
I would use unbound controls to get my user input then run an append query to update the table or you can do the same with vba and recordsets for data entry. It gets all records because your form is bound to the table for its record source

The query would use the control as its datasource recordsets need to be accessed with vba eg

Dim db AS DAO.Database
Dim rs AS DAO.Recordset

Set db = Currentdb()
Set rs = db.OpenRecordset("TableName", dbOpenDynaset)

With rs
.AddNew
.Fields("FieldName") = ControlName
.Update
End With

rs.Close
db.close


HTH << MaZeWorX >> "I have not failed I have only found ten thousand ways that don't work
 
How are ya Niebotel . . .

Have you tried [blue]Data Entry Mode?[/blue]
Accessory said:
[blue]DataEntry mode: If you are only going to be adding records, use the Data Entry command on the Records menu. This is more efficient for adding records because [purple]existing records are not read from the database[/purple].[/blue]
Sample DoCmd:
Code:
[blue]   DoCmd.OpenForm "[purple][b]YourFormName[/b][/purple]", , , , acFormAdd[/blue]
[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Thanks guys, I'm going to try.
Little problem to solve: I have a serach function which makes it possible to use "old" records for data entry. So on moment of data entry a new record the system lets you search on old records.
 
Niebotel . . .

Not quite understanding your search function. [blue]Provide a detailed example![/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Hi, AceMan, (very nice of you to help me!)
I will give you the description:

The system we use is a visitors registration system of a sailing club in Bruinisse (The Netherlands)

When a visitor wants to stay in our harbour we make a registration in the system; several fields have to be filled like name, address, boat name, lenght, etc.(in total 10 fields).

If a visitor visits our harbour for the next time we enter the name of the boat. The systems shows the records containing this boat name and we select the right record. On that moment the data of the 10 fields are copied into a new record. So the harbourmaster does not have to enter all the fields again.
This "search" function is done via a combo box with inputfield; If you start typing the records show up.

Greetings Willem (Niebotel)

 
You may want to look into executing certain queries and storing the results in temp tables when the db is first opened ... just something else to think about :)

Aswell the search feature could be executed from a command button

HTH << MaZeWorX >> "I have not failed I have only found ten thousand ways that don't work
 
Yes I was already thinking of that. Actually my tables are on a sharepoint. Sharepoint gives the possibility to work off-line. After working you can synchronize again.
Bit there are two problems with that solution:
1. The funtion synchronize is not available in the runtime version
2. In the full access version the user can choose between sunchronize amd "skip changes" And that brings a risk that the user could choose the wrong action and then we miss all the updats.
So programming a temp table is probably a solution.
I have to think it over; anyhow thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top