By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,325 Members | 1,224 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,325 IT Pros & Developers. It's quick & easy.

Go to next record command button

100+
P: 283
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
Share this Question
Share on Google+
5 Replies

MMcCarthy
Expert Mod 10K+
P: 14,534
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

100+
P: 283
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
Expert Mod 10K+
P: 14,534
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

100+
P: 283
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
Expert Mod 10K+
P: 14,534
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.