How to disable the New button on the DAP navigation control

How to disable the New button on the DAP navigation control

Post by boton » Sun, 11 Apr 2004 02:47:49


am trying to use Vbscript in a DAP to disable the New button and
re-enable the New button based on a certain condition,

I believe the basic form of the Vbscript statement to disable is:
button.disabled = true
and to re-enable is
button.disabled = false .

I cannot figure out, though, how to refer to the new button control.
Here is the code that describes the navigation control (BTW, I have
tried qryOrdentry2NavNew.disabled= true without any luck):

--------------------------------------------------------------------
<TABLE class=MsoNavContainer id=qryOrdentry2Navigation
style="LEFT: 0in; WIDTH: 568px; POSITION: absolute; TOP: 0.25in;
HEIGHT: 18px"
cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD class=MsoNavButton style="WIDTH: 20px; HEIGHT: 20px"><IMG
class=MsoNavFirst id=qryOrdentry2NavFirst tabIndex=-1 height=20
src="owc://GIF/#11200" width=20></TD>
<TD class=MsoNavButton style="WIDTH: 20px; HEIGHT: 20px"><IMG
class=MsoNavPrevious id=qryOrdentry2NavPrevious tabIndex=-1
height=20
src="owc://GIF/#11202" width=20></TD>
<TD style="VERTICAL-ALIGN: middle; WIDTH: 100%; TEXT-ALIGN:
center"
noWrap><SPAN class=MsoNavRecordsetLabel id=qryOrdentry2NavLabel
style="VISIBILITY: hidden" tabIndex=-1>Record |0 of
|2</SPAN></TD>
<TD class=MsoNavButton style="WIDTH: 20px; HEIGHT: 20px"><IMG
class=MsoNavNext id=qryOrdentry2NavNext tabIndex=-1 height=20
src="owc://GIF/#11204" width=20></TD>
<TD class=MsoNavButton style="WIDTH: 20px; HEIGHT: 20px"><IMG
class=MsoNavLast id=qryOrdentry2NavLast tabIndex=-1 height=20
src="owc://GIF/#11206" width=20></TD>
<TD class=MsoNavButton style="WIDTH: 20px; HEIGHT: 20px"><IMG
class=MsoNavAddNew id=qryOrdentry2NavNew tabIndex=-1 height=20
src="owc://GIF/#11208" width=20></TD>
<TD class=MsoNavButton style="WIDTH: 20px; HEIGHT: 20px"><IMG
class=MsoNavDelete id=qryOrdentry2NavDelete tabIndex=-1
height=20
src="owc://GIF/#11210" width=20></TD>
<TD class=MsoNavButton style="WIDTH: 20px; HEIGHT: 20px"><IMG
class=MsoNavSave id=qryOrdentry2NavSave tabIndex=-1 height=20
src="owc://GIF/#11214" width=20></TD>
<TD class=MsoNavButton style="WIDTH: 20px; HEIGHT: 20px"><IMG
class=MsoNavUndo id=qryOrdentry2NavUndo tabIndex=-1 height=20
src="owc://GIF/#11212" width=20></TD>
<TD class=MsoNavButton style="WIDTH: 20px; HEIGHT: 20px"><IMG
class=MsoNavSortAsc id=qryOrdentry2NavSortAscending tabIndex=-1
height=20
src="owc://GIF/#11216" width=20></TD>
<TD class=MsoNavButton style="WIDTH: 20px; HEIGHT: 20px"><IMG
class=MsoNavSortDesc id=qryOrdentry2NavSortDescending
tabIndex=-1
height=20 src="owc://GIF/#11218" width=20></TD>
<TD class=MsoNavButton style="WIDTH: 20px; HEIGHT: 20px"><IMG
class=MsoNavFilter id=qryOrdentry2NavFilterBySelection
tabIndex=-1
height=20 src="owc://GIF/#11220" width=20></TD>
<TD class=MsoNavButton style="WIDTH: 20px; HEIGHT: 20px"><IMG
class=MsoNavToggleFilter id=qryOrdentry2NavFilterToggle
tabIndex=-1
height=20 src="owc://GIF/#11222" width=20></TD>
<TD class=MsoNavButto
 
 
 

1. Is it possible to determine the button clicked on the Navigation control in a DAP?

2. how to disable the 'next' navigation button to new records on conditions?

Hi, I am new here. And this is so confusing to me.

On the online MS access downloads, I downloaded the order entry sample
database. On the 'Orders by customers' form, we can click on the
'Payments' button and view/add new payments.

When the customer's 'amount due' is zero, the 'next record' on
navigation button is disabled. How does this work?

I tried my own, and the zero amount kept going on, until i opened the
form a second time.

I checked the form property, all the VBA codes for this form, and the
"Orders by Customers" form's subform's events. I could not find
anything.

What am i missing here?

Many thanks in advance.

ming

3. Ever noticed this discrepency of events for the Navigation control in a DAP?

4. DAP DAP DAP...Who is the expert here?

5. IE8 Add On's Disabled Bar Upon Opening Pages

6. NumericUpDown Control - Discoloration if Buttons are Hidden and Control is Disabled

7. how do you disable the navigation buttons at the bottom of a form.

8. How do I: Disable navigation button and rollover.

9. Disabling form search and filter icon in navigation buttons bar?

10. Disable navigation buttons

11. Disabling Browser Navigation + Refresh Button

12. How to disable Accordion navigation button

13. In Preview, Navigation Buttons (on Link Bar) disabled

14. ASP 2 Wizard control: Navigation buttons in the header and Navigation Bar area. Or, call the Next/Prev button from my own buttons?