Open form with no navigation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to have a form button that opens a form with no navigation (going to a
specific record)

Opening the form normally there will be navigation. How can i
programatically set a form property (Navigation buttons) to "No"? thanks
 
Had you taken a moment to look through the VBA Object Browser, you would have
found that

Me.NavigationButtons = False
Me.RecordSelectors = False

Woudl probably do what you want.
 
I have the following on click action:
DoCmd.OpenForm "Courses", acNormal, , "[CourseID]=" & Me![CourseID]

how do i incorporate the form parameters? Thanks
 
Sorry, Steven, I don't understand the question.
It appears from this code you are opening the form to a specific record and
you want to prevent the user from moving off the record.
In addition to the Nav buttons and record selectors, you will also want to
set the form's Cycle Property to 1 (current record); otherwise, when the user
tabs from the last control on the form, it will move to the next record.

If you are asking how to do this in the form's opening parameters, you
can't. You can either set the properties in design view or you can set them
with VBA. You will want to do this in the form's load event.

It this doesn't answer yout question regrading parameters, please post more
info.


Steven said:
I have the following on click action:
DoCmd.OpenForm "Courses", acNormal, , "[CourseID]=" & Me![CourseID]

how do i incorporate the form parameters? Thanks

Klatuu said:
Had you taken a moment to look through the VBA Object Browser, you would have
found that

Me.NavigationButtons = False
Me.RecordSelectors = False

Woudl probably do what you want.
 
DoCmd.OpenForm "Courses", acNormal, , "[CourseID]=" & Me![CourseID]
Form_Courses.NavigationButtons = false

or

DoCmd.OpenForm "Courses", acNormal, , "[CourseID]=" & Me![CourseID]
[Forms]![Courses].NavigationButtons = False
 
Exactly, except I think the OP will also need to set the Cycle property.

Powderfinger said:
DoCmd.OpenForm "Courses", acNormal, , "[CourseID]=" & Me![CourseID]
Form_Courses.NavigationButtons = false

or

DoCmd.OpenForm "Courses", acNormal, , "[CourseID]=" & Me![CourseID]
[Forms]![Courses].NavigationButtons = False


Steven said:
I have the following on click action:
how do i incorporate the form parameters? Thanks
 
Back
Top