Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2007

Tip: Looking for answers? Try searching our database.

Set form's property when opening it

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alan T - 22 May 2007 08:00 GMT
I would like to open a form by setting some properties:
eg. using
DoCmd.OpenForm "frmEmployee", acNormal, , , acFormAdd, acWindowNormal

setting the record navigator visible/invisible

Is it possible?
Andy Hull - 22 May 2007 09:44 GMT
Hi Alan

You can set the navigation properties immediately after opening the form...

DoCmd.OpenForm "frmEmployee", acNormal, , , acFormAdd, acWindowNormal
Forms![frmEmployee].NavigationButtons = True

or in the forms open even... Me.NavigationButtons = True

If neither of these is suitable, then you could use the OpenArgs argument
like...

DoCmd.OpenForm "frmEmployee", acNormal, , , acFormAdd, acWindowNormal,
"ShowNav"

And then test for this in the forms open event...

If Me.OpenArgs = "ShowNav" then
Me.NavigationButtons = True
Else
Me.navigationButtons = False
End If

Regards

Andy Hull

> I would like to open a form by setting some properties:
> eg. using
[quoted text clipped - 3 lines]
>
> Is it possible?
Alan T - 23 May 2007 05:36 GMT
Hi, yes it works to make the Navigator buttons visible.

Can I also configure the buttons visibility?
I want to allow the user navigate the records but not add records.
Can I disable the * button?

> Hi Alan
>
[quoted text clipped - 31 lines]
>>
>> Is it possible?
missinglinq - 23 May 2007 11:59 GMT
Again, in the forms open event... Me.ButtonName.Visible  = False

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Andy Hull - 23 May 2007 12:14 GMT
In the forms open event...

Me.NavigationButtons = True
Me.AllowAdditions = False

will allow navigation but not allow new records (it greys out the *)

Regards

Andy Hull

> Hi, yes it works to make the Navigator buttons visible.
>
[quoted text clipped - 37 lines]
> >>
> >> Is it possible?
Alan T - 24 May 2007 06:13 GMT
Thanks.
That is what I want.

> In the forms open event...
>
> Me.NavigationButtons = True
> Me.AllowAdditions = False
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.