Complicated GOTO EOF problem

Lol Owen

Registered User.
Local time
Today, 05:13
Joined
Mar 15, 2004
Messages
86
Hi, got a small problem. As part of a database I have to do for a booking system for a conference centre I have a form (frmSummary) that displays the results of a query (qryT101Book), the query itself displays all the bookings for a certain room from today onwards. This form only displays a summary of the information. I have placed a button on the form to call up the main booking form, (frmBooking) which allows the input of all the data for the booking. On ythis second form, frmBooking, I have placed a button to save the record and update the display on frmSummary. The code I have used for this is Forms![frmSummary].Requery and it works okay, the form is updated. However, tomake it easier to confirm the booking has occurred I would liketo have the cursor move to the last record, i.e. the new booking, on the frmSummary once the command button on frmBooking is clicked. If it was a one record per form situation i would use SetFocus but I'm unsure how to go about this one.

Any ideas please?

Thanks, Lol
 
Do you mean movelast?

Is this a one-user program?

can you post your code?
 
Hi, have attached database. This is a very rough working model at design stage, proper nomenclature hasn't been used yet, I'm just using it to test out design theories and my own capabilities. It is a one user program, and if movelast is the thing I want then great!

Thanks a lot, Lol
 

Attachments

Sorry, ought to mention on the actual dbase the summary form is called Query1 which derives its info from a query called Query1. On form Query1 a button brings up form Booking to allow the input of complete booking details. On Booking a button saves the new data, refreshes the data on form Query1. I want this button to also send the cursor to the last record on the newly updated form Query1 to allow easier confirmation that the data has been entered.

Thanks, Lol
 
If you want to make absolutely sure you need to "fetch" the Primary key of the saved booking.
Then requery the main form, and do a search for the PK in that form.

Regards
 
Sorted it thanks, used the code below behind the button on the second form:

DoCmd.GoToRecord acDataForm, "Query1", acLast


Thanks Liv and namliam for your replies.

Cheers Lol :D
 

Users who are viewing this thread

Back
Top Bottom