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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DAP displaying previous record in DB 2

Status
Not open for further replies.

roles40

MIS
Aug 20, 2003
21
US
Here's the setup:
Two DAPs one for users one for admin. The DB and the pages are on a network. Everything is liked fine, the system works.

Two Questions:

1. How do I keep the DAP from displaying the previous record every time that it is opened from the network file?

2. IE pops up a prompt saying that the program is crossing over to a new domain??? Any thoughts?

Possible thoughts already considered:

1. Changing rights to the DB from read/write -> write
The only way that I have found to keep this from happening, is for there to be no records in the DB.

Thanks for any help,

Jamie
 
Not sure I understand #1.

However, for question #2, in Internet Explorer, goto Tools|Internet Options. Then select the Security Tab and select Local Intranet. Then select the button "Custom Level..." (at the bottom of the page). Then enable the appropriate items.
 
Thanks for the help on question 2.

Let me restate question 1:

This particular DAP is set up to allow the viewer to enter data into 8 feilds, which are entered into the DB. Every time I open the DAP it displays the last record added to the DB, not just by me, but by any user. I have even proxied into other computers on the network to see if they had the same result, they did. My question is how do I make the DAP appear blank upon opening.

Thanks again,

Jamie
 
You need to position the page to a new record when the page is first loaded. Something like this:

MSODSC.CurrentSection.DataPage.Recordset.AddNew
 
Thanks again. Do I have to do that in a text editor to the HTML file, or can i just do that through Access?
 
I'm not quite sure which event you need to put the code in. By default, my users come in to Add only mode (they can't see previous records.) So if they want to add a new record, I issue the command (see previous post) at that time. However, you could try putting the code in the Onload event of the window. If that doesn't work (and chances are it won't, I don't believe MSODSC has been created yet) try when the document loads, etc.

What you might want to do is to check to make sure the code works before trying to figure out which event to tie it to. Therefore, put a command button on your page and in the Onclick event, insert the code from my previous post (it should work, it does for me). If it works, then try my suggestions in the previous post.

To get to the editor, right click somewhere on the page. Then select "Microsoft Script Editor" via the submenu. You'll see a bunch of html code, after the Meta statements, insert the code (see previous post). It would look something like this:

<META content=&quot;MSHTML 5.50.4616.200&quot; name=GENERATOR><!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:LastAuthor></o:LastAuthor>
<o:Revision></o:Revision>
<o:TotalTime></o:TotalTime>
<o:Created></o:Created>
<o:LastSaved></o:LastSaved>
<o:Version>9.3821</o:Version>
</o:DocumentProperties>
<o:OfficeDocumentSettings>
<o:DownloadComponents/>
<o:LocationOfComponents HRef=&quot;file:D:\msowc.cab&quot;/>
</o:OfficeDocumentSettings>
</xml><![endif]-->

<SCRIPT language=vbscript event=onload for=window>
<!--
MSODSC.CurrentSection.DataPage.Recordset.AddNew
-->
</SCRIPT>
 
In the paragraph or page properties place this code in the class name - MsoNavAddNew

I currently have it in the Paragraph properties and it works perfect.

What happens is as soon as you launch the page it automaticaly opens to a new record. IF nothing is entered then nothing is placed in the associated table.

Good luck!
Scott
 
Good find sthibodeau. Prior to issuing my last post, I was looking for a property in the page and paragraph and didn't see it. If figure there was a way to do it without messing with code. I'll give you a star.
 
You all are great, that would have taken me forever.

Thanks

Jamie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top