470,593 Members | 2,372 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,593 developers. It's quick & easy.

Go to next record command button

283 100+
Hello all,

What im trying to create is a command button that will go to the next record on a table, but its not quite as easy as it sounds :D

What I have is a form where you can pull a record based on the criteria of 3 text boxes. Once you type that in a few other text boxes fill in with the information from the record on the table.

Now sometimes there might be duplicate records matching the critera, this is where the button comes in. I want to make it where you can press the next button and it will then display the next record with the same matching criteria and then if i need to go back to the other record i was just looking at with a previous button.

Appreciate any help with this

thanks,

Slen
Sep 29 '10 #1
5 3307
MMcCarthy
14,534 Expert Mod 8TB
There are too many unknown variable here to give you an answer.

Is the form bound or unbound?
What is the code that currently populates the fields?
What is the query used to find the record(s)?
Sep 29 '10 #2
slenish
283 100+
Hello MMcCarthy,

The form is Unbound, the record is pulled using the DLookup function which is what im thinking I might have to use with the next record button. Other code running is a DCount to let you know there is duplicate records. There is no Querys.

Hope that helps narrow down some things :D
Sep 29 '10 #3
MMcCarthy
14,534 Expert Mod 8TB
Because the form is unbound and you are using a dlookup I can't think of any way you could bind two records to the form at the same time so you will just have to code a dlookup on the next and back button.
Sep 29 '10 #4
slenish
283 100+
That sounds like a plan to me problem is how would i get the Dlookup feature to look at the next record and display it? Any ideas?
Sep 29 '10 #5
MMcCarthy
14,534 Expert Mod 8TB
I'm not sure, if your DLookup results in two records you have to find some way to distinguish between them.
Sep 29 '10 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by William Wisnieski | last post: by
7 posts views Thread by pushrodengine via AccessMonster.com | last post: by
1 post views Thread by troy_lee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.