Related Topics

Form Load...form Open..what Is The Difference?

Determine name of form opening a form?
Is there a way to determine in the Open() / Load() API which other form has issued the request to have Access open form Me?

I am thinking to have a selective prepare based on if the form is being opened by a parent or re-opened by a child. In my mind, I see it looking the same in Open() / Load() no matter who is opening the form. But perhaps someone knows of a trick I do not know of that the Opener may be found out


Macro to load form not working after database split
Have a database that works just fine before running the database splitter. Once the database is split the macros to load a form will not run when you select the command button. It will only work for two users. These two users do have full control of the folder where the database frontend and backend are stored. I did give certain users and groups full control as well but the macros will still not load the form.
No error messages are displayed. I did update the links but it did not make a difference.
Both the frontend and backend are located on the server but I also tried moving the frontend to the local computer and it did not make a difference


Order of events on forms?
This one has me baffled.

From one of my forms, I use this code to open another one in dialog mode:

[CODE]

Pushform is a procedure to hide the current form but not close it. The problem is in the Translate Form. According to Microsoft, the order of events when opening the form should be:

Open -> Load -> Resize -> Activate -> Current

But by using debug.print, I have found the order of events to be this when I open the form:

Current -> Load -> Current -> Open (Activate did not fire at all)

The order is backwards and On Current fires twice! It's a pain because On Current depends on values set by On Load, but which are messed up by On Open.


Load form on db open
How to load one form on db open and how to hide Navigation pane and Home Create External data and Database tools?


Auto Load Form on Open
ya people, was wondering I know that its probably in search and I did have a look but as its the Weekend I won't be able to work on it and want a quick fix if possible, when I open the database I want a menu form to load automatically


Form Load New Record not working
I am using Access 2010. I have setup a Navigation form (Navigation) and several subforms. On one form, Create New FP Sample, I have entered the following code to have it load a new record.

Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRec
End Sub

However, when I open the database, this form does not load a new record immediately. It will eventually load a new record after selecting a different subform several times.

I have another subform, Create New Ing Sample, with this same code and it loads a new record when opened just fine.


Order of events on forms?
This one has me baffled.

From one of my forms, I use this code to open another one in dialog mode:

Docname = "translate form"
gbSQL_Failed = False
gbVerb_Only = False
gbUse_Keywords = False
gsCurrent_English = English
PushForm
DoCmd.OpenForm Docname, , , , , acDialog

Pushform is a procedure to hide the current form but not close it.

The problem is in the Translate Form.

According to Microsoft, the order of events when opening the form should be:

Open -> Load -> Resize -> Activate -> Current

But by using debug.print, I have found the order of events to be this when I open the form:

Current -> Load -> Current -> Open (Activate did not fire at all)

Does anyone know what's going on here? The order is backwards and On Current fires twice!

It's a pain because On Current depends on values set by On Load, but which are messed up by On Open


How to stop DoCmd.Maximize in one form from maximizing all later forms
For one form, I want it to maximize upon opening. So, in that form's "On Load" Event, I put in:

1) Private Sub Form_Load()
2) DoCmd.Maximize
3) End Sub
However, all subsequent forms that I open will maximize. I do not want that. I want the one form mentioned above to open maximized, and I'd like the other forms to open at their saved sizes.

For the subsequent forms, I tried putting in code in their "On Load" events, using DoCmd.MoveSize. However, even with height and width specifications, it will still open maximized IF I have opened that other form first.

In short, how can I have one form open maximized and other forms not?


Instant load of a form
Is it possible to make the database load a form when it is started? When I click on the database file on the desktop, I would like it to instantly open the form Frontpage. How


Difference between load and open
I'm not exactly sure what kinds of things to put in these two procedures.

What kinds of things should go into LOAD, and what into OPEN


Move from form to form with same record
Have a db with 10 forms. Regardless of which form is opened.a user will search for a record to modify. If they move to another form I need to keep that record id alive so the next form is automatically on that record. Thoughts?
I was going to do a little macro that would fire on each form open and check a VBA snippet for a record id. If not null, load said record, else load first record


Move from form to form with same record
Have a db with 10 forms. Regardless of which form is opened.a user will search for a record to modify. If they move to another form I need to keep that record id alive so the next form is automatically on that record.
I was going to do a little macro that would fire on each form open and check a VBA snippet for a record id. If not null, load said record, else load first record.


Understanding form loading on Open
1. If I understand properly. For a single form that is set to use as its Record Source a table, it must load all the records in the table before displaying the form.

2. What about form with subforms? Do the subforms do the same or do they only load the data pertaining to the current link child master record?

I am interested in trying to optimize a form that has 20+ subforms and is | taking 10-20 seconds or so to load. I have read that I should remove the default record source and populate the record source based on my lookup field so it only has to access one record at a time. What else should I be trying to do to improve performance?


Tables open slowly
I have a user who was complaining because a particular database feature that she uses a lot is running painfully slow. And it's true. It is ridiculous.

So I was trying to figure out why. What I noticed is that it's taking her computer a lot longer than others to open tables. It doesn't matter if it's a local Access table or if it's linked to SQL. It opens unusually slowly.

1. She has a newer computer with plenty of memory.
2. She's on the same network as the other users and I didn't notice other things on the network taking unusually long to open.
3. If I open a form, it will open quickly, but maybe that's because while it does load all the records, it only needs to have loaded one for the form to open. At least I assume that makes a difference.

Has this kind of thing been a problem for anyone else? Does anyone have any idea why this might be happening


Report data load time
I seem to be having an issue with my reports. When I open them sometimes the data will load straight away and other times it takes 10-30 seconds and other times it wont load at all until I start clicking where data should be. The template loads i.e. labels etc. but no text boes which are linked to a query.

Any help would be much appeciated.

Also to add to the report os opened from a subform in a main form. But when I open the subform on its own and open the report its instant everytime.


How to apply a filter on form load
The are two properties on a Form property sheet that look like they should allow me to add a filter when the form opens. They are:
1) Filter
2) Filter On Load (I have this one set to YES)
I have a Query defined that I'll like to use as a filter when the form opens. How can I do this. And, no I don't want to change the record source to the form because I'd like to retainthe ability to remove the filter when the form is open to get back to all records.
I'm using Access 2010


Load Order?
I am working in MS Access 2010. I have a login form for that is set to load from the "Display Form" property of the Current Database tab. Basically the login form loads first thing when the database is opened.

I have created a function that checks the server for latest FE version and updates it if needed. The code is located in the form's "On Open" event.

I have some problems with some users with the FE client getting corrupted while updated. It think it might have something to do with my code running a bit slow and the form tries to load while the code is attempting to delete and copy over new files.

Is there a better way of relocating my update code? Should I put it in the "On Load" event? I am thining of creating a macro with my update code. Will this be better?

Database opens -> runs Macro -> if update needed delete and copy over new db -> if no update then continue to load login form


Code for button to open new form passing value
I have a 8 forms referring to 8 tables. Tables are all related by the ID field (which is also the primary key) one-to-one to the ID fIeld of the first table.

At the end of each form I need to code the button to open the next form following this rules:

1) get the value of field ID of form 1;
2) open a new form;
3) look for value of ID from form 1 in ID in table 2:
If value exists load corresponding record in form 2
If value does not exist open new record in table 2 and pass value to field ID of form 2.


Unwanted parameter value pop-up
I dont really know what is going on here.

I am trying to open a form and now it keeps asking me for a parameter value:
Service.[Service_ID]. The thing is I have no idea where, in the code, Access is looking for this value.

It seems to be doing this prior to the onset of my form load& before any form events happen (e.g., when I walk through the code, the parameter popup appears before any of these events are kicked off: Open Load Resize Activate Current). Prior to any these aformentioned events kicking off, I make attempts to open a form like so:

DoCmd.OpenForm "00160_Clone_Service_Level_Contacts", acNormal, , , acFormAdd, , strArgs

As soon as I step through the DoCmd.OpenForm line, a message box pops up asking for the parameter value, shown previously: Service.[Service_ID].
So, its looking for Service_ID from the service table, but the form is unbound. So when does it check for this value? And how can I stop it from doing this


How do you open a form, and Automagically click a button?
I am running into an issue with a MS Access form. When I open my form I have a lot of text boxes that will update once a button on the form is pressed. (takes about 30 seconds to runthrough code and update), but I want to do Away with the button, and make it to when you open the form it automatically clicks that "hidden" button and populates data.

I have not been able to make it work for some reason. So, how do you click a button when you tell the form to load? Is their a special spot?