Topics Search

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

Form Load...form Open..what Is The Difference?
Views: 3
I am wondering what is the difference between the form load event and form open event. I have a couple of different things going on with my forms that I need to take place when they arefirst "used" (for lack of using the word open)

First, I have user levels set up very basically with VBA that checks a persons user level at sign on and if they are a certain level, buttons and forms are hidden. This is in the form "load" event.

I also have a sizing option. I need my forms to open under the menu form I created. I have this set in the form "open" event. I am curious, because I am still in the design phase and sometimes when I go from form view to design view and back to form view, my buttons disappear and I have to re-log in.

I am concerned that there maybe issues once I make the users copy an mde. and I just want to be 100% I am using the correct events.
Sponsored Links:

More topics

 

Determine name of form opening a form?

Preview
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

Preview
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?

Preview
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

Preview
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

Preview
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

Preview
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.
 

How to stop DoCmd.Maximize in one form from maximizing all later forms

Preview
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?
 

Order of events on forms?

Preview
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
 

Instant load of a form

Preview
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
 

Move from form to form with same record

Preview
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