473,326 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

What is quicker or better?

Hi all,

I have a access 2000 database with linked tables to a access 2000 backend
database. The performance is really slow. I am looking for the best way
to open a form to add a new record without retrieving the full dataset.
In my sample below I have two options I could think of, is there any
important difference? Which one is better or quicker to use? Am I on the
right track?

Thanks and sorry for being a newbie.

Newbie.
Private Sub cmdObservationRecords_Click()
On Error GoTo Err_cmdObservationRecords_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmObservation"
DoCmd.OpenForm stDocName, , , stLinkCriteria
' -- Option 1 --

Forms!frmObservation.DataEntry = True

' -- Option 2 --

' DoCmd.GoToRecord acDataForm, stDocName, acNewRec
Exit_cmdObservationRecords_Click:
Exit Sub

Err_cmdObservationRecords_Click:
MsgBox Err.Description
Resume Exit_cmdObservationRecords_Click

End Sub
Nov 12 '05 #1
1 1864
I would say both of those approach are going to be not very good, and both
will probably be about the same.

I would actually open the form in add mode, so the form goes right to a new
record.

In both of your examples, you first load the form. and THEN go jump into add
mode.

Also, you have declared a variable stLinkCritiera and you never use it. I
would suggest you dump that stuff that you never use.

Anyway, as mentioned, I would jump the form right into add mode.

Hence, I would use:
Dim stDocName As String

stDocName = "frmObservation"
DoCmd.OpenForm "OpenForm",,,,acFormAdd


If you only want the user to enter ONE record, then I would turn off the
forms "allow additions", as then the above will only over ride that setting
for one record (which is ideal). I would also suggest that you set the forms
cycle property to current record, and thus the tab key will go round and
round in the current screen, and not jump to a new records (this also
applies to the page up/down keys, and also the mouse wheel).

--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
ka****@msn.com
http://www.attcanada.net/~kallal.msn

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: NotGiven | last post by:
I am researching the best place to put pictures. I have heard form both sides and I'd like to know why one is better than the other. Many thanks!
23
by: darwinist | last post by:
What PHP Represents There is no shortage of complaints one could make about php as a language, and although the list does shrink with each release, some of them are inherent to the origins and...
44
by: lester | last post by:
a pre-beginner's question: what is the pros and cons of .net, compared to ++ I am wondering what can I get if I continue to learn C# after I have learned C --> C++ --> C# ?? I think there...
13
by: Chris Mantoulidis | last post by:
There must be some tips to make a program quicker. I guess more than 50% of ppl here will say "avoid the if-s". Yeah I know this makes a program quicker but some times an "if" is inevitable,...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
5
by: milkyway | last post by:
Hello, I'm a newbie who hopes they have come to the correct place. Basically, I want to develop a web service for consumption by .NET program (hopefully C#). The performance of the service...
11
by: Paul Brady | last post by:
Apparently, I have been living on the wrong planet. I have written 15 databases in Microsoft Access in the past 10 years, some of which are split, one uses ODBC interface with a SQL server, one...
2
by: Chuck | last post by:
Among other things is Filemaker Pro a relational database. Some of my readings have "hinted" that it is, but descriptions of some of its tables (files?) sure don't look like it. It also looks...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.