Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Access Page Query

Status
Not open for further replies.

PortyAL

Technical User
May 13, 2005
126
GB
Hi

I have a routine which creates a data access page from a form, the objective being to allow external users to enter data. I have found that the DAP created will allow data already entered to be amended, but will not allow data to be entered in blank fields.

Is there any way round this (apart from populating the fields prior to the DAP being created?)

Also is there any way of automatically editing the navigation buttons that appear on the bottom of a DAP, to omit the delete record button? I am able to do it via HTML editor but I would not always be the person creating the DAP.

Thanks

AL
 
The DAP must have all primary keys from all tables on it to be updatable. From what was your form created? A query? Did you include all primary keys.
Second question:
In your DAP design view, click on the Navigation Control, right click on it, click on Properties, click the All tab and remember the ID (the name of the navigation control.
Right click again, go into Microsoft Script Editor and on the left under Client Objects and Events, scroll down to window. Double click on window and double click on the onload event. In the script pane, type:
<SCRIPT language=vbscript event=onload for=window>
<!--
employee_tableNavigation.ShowDelButton = false
-->
</SCRIPT>
the <Script and </Script will already be there. Just substitute your navigation name.
 
Thanks

The DAP is created from a form. The underlying query is based on one table and has the primary field included, although the form from which the DAP is created doesn't include the primary field. I will add the primary field to the form to see if that makes a difference.

The DAP allows data already there to be updated, but will not allow data to be entered in blank fields.

In relation to the second question, I use the following code to create the DAP

Code:
Sub CreateDAP2_click()
Dim pagename As String

pagename = "p:\internal audit\On-line Action Plans\" & Forms![frm recommendations]![Job] & ".htm"

DoCmd.OutputTo acOutputForm, "layout", acFormatDAP, pagename

End Sub

This saves the DAP directly to the server. It is not shown in the DAP window of the database.

Thanks for your help

AL
 
Update - I included the primary field in the form from which the DAP is created. I can now enter data in blank fields, but can only access those fields by using the TAB button. Clicking in them with the mouse does not work. All very confusing!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top