I used Microsoft Access to create what is called a Data Access Page. It's basically a html page with code in it that makes it work with a Access Database. Anyways, I created a simple button on this page that, when pressed, changes all the controls on the page to display the information for what ever the next record is in the database. It's a 'next' button, essentially. Anyways, when I look at the code for what was generated, it looks like a mix between HTML, Javascript and Visual Basic. Here is the code of the button:
<BUTTON id=Command0
style="BACKGROUND-IMAGE: url(./Navigation_files/image001.bmp); BACKGROUND-POSITION: center center; BACKGROUND-REPEAT: no-repeat; HEIGHT: 0.396in; LEFT: 4.542in; POSITION: absolute; TOP: 0.458in; WIDTH: 0.396in"
tabIndex=10 title=Command0></BUTTON>
<SCRIPT event=onclick for=Command0 language=javascript>
try { MSODSC.CurrentSection.DataPage.MoveNext (); }
catch (e)
{ alert (e.description);}
</SCRIPT>
It appears to use Javascript to actually change all the controls on the page to the next record. Anyways, what I want to do is make the button jump to the next 10 records, instead of just one. So if I'm currently on record 23, pressing the button would make me be on record 33. Get it? I was thinking that there must be some sort of offset I can apply to the above code so that if moves by a certain offset, but I don't know Javascript...can anyone please help me here? And be very specific please, as I am new to Access and Javascript. I already posted this in Access forums and I was told to try posting it here also. Thanks!
jake
<BUTTON id=Command0
style="BACKGROUND-IMAGE: url(./Navigation_files/image001.bmp); BACKGROUND-POSITION: center center; BACKGROUND-REPEAT: no-repeat; HEIGHT: 0.396in; LEFT: 4.542in; POSITION: absolute; TOP: 0.458in; WIDTH: 0.396in"
tabIndex=10 title=Command0></BUTTON>
<SCRIPT event=onclick for=Command0 language=javascript>
try { MSODSC.CurrentSection.DataPage.MoveNext (); }
catch (e)
{ alert (e.description);}
</SCRIPT>
It appears to use Javascript to actually change all the controls on the page to the next record. Anyways, what I want to do is make the button jump to the next 10 records, instead of just one. So if I'm currently on record 23, pressing the button would make me be on record 33. Get it? I was thinking that there must be some sort of offset I can apply to the above code so that if moves by a certain offset, but I don't know Javascript...can anyone please help me here? And be very specific please, as I am new to Access and Javascript. I already posted this in Access forums and I was told to try posting it here also. Thanks!
jake