Record Navigation

L

Luke

I have a little problem...

I am wanting to use access buttons to navigate through the records. this i
can do with ease but my problem comes when i am wanting to pick up some of
the data straight away and use it to lock down some fields. It all words in
Access 2003 but put it in Access 2007 and it breaks.

Basically i have the following code:

DoCmd.GoToRecord , , acNext

Call PremShowHide(form_frmJob.CustID) <-- this is a proceedure i am
trying to call straight after jumping to the next record is pulling the
value for CustID from the record i have just navigated from,
not the one i have just gone to (if that makes sense)
Call JobLockdown(form_frmJob.Jobstatus)

Is there anyone who knows how i can get it to look at the information on the
record i have just moved to instead of the one i have just moved from??

I dont have this problem in Access 2003, just in Access 2007.
I have tried refreshing the form and using different prefixes to the fields
CustID and Jobstatus (i.e. Me.CustID) but it is still the same.

Thank for any help in advance,
Luke
 
L

Linq Adams via AccessMonster.com

If you want something to be done based on info from the record you just moved
to you have to use the OnCurrent event.

Private Sub Form_Current()
Call PremShowHide(form_frmJob.CustID)
Call JobLockdown(form_frmJob.Jobstatus)
End Sub

If you only want these actions carried out on EXISTING RECORDS, not NEW
RECORDS, then

Private Sub Form_Current()
If Not Me.NewRec Then
Call PremShowHide(form_frmJob.CustID)
Call JobLockdown(form_frmJob.Jobstatus)
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top