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

Previous record

Status
Not open for further replies.

007700

Programmer
Jan 24, 2005
20
NL
Question, maybe anyone knows a nice and easy solution.

I have got a form bassed uppon a table wich is filled the months of the year.
Now I have a form with a combo via wich the user can select a month. That all works fine.

The thing I would like to do now is show on the form in text boxes the month that commes before the selected month.

So if the user selects February, I want to display January in a text box. This is just the preceding record in the table, but I don't know how to accomplish this.

Thanks in advance..

Greets from Holland

So the question is: How can I display the record from a table that precedes a selected record ?
 
you would probably be best using a subform, that we the record on the main form changes, if then updates the subform with the preceeding record.

You would need to use the IDNumber of the table. I think that should work but i have not tested it, or have any code to give to you to try.

Let me know if this is what you are after, and then i can have a go at the code for you...
 
the only problem i can think of is if its at the start of the records, would you need it to go to look at the end of the records.???
 
This should do the trick and is all the functionality I need. If you could provide me with some code, that would be great !!!

You don't have to worry about the start en end of the record.....I have got that one covered..

Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top