Next record event

cajsoft

Registered User.
Local time
Today, 21:38
Joined
May 8, 2006
Messages
13
Hi,
I require to be able to check whether or not a yes/no box has been selected, each time the database is navigated.. ie, next record , previous record.

I cannot find the event in VB to allow me to perform this function. I see AfterUpdte and beforeUpdate events, but sometimes the data is only browsed and not updated.

anyone help please?

Thanks
CJ.
 
Last edited:
Welcome to the Access World Forums and try the *Current* event.
 
RuralGuy said:
Welcome to the Access World Forums and try the *Current* event.

Thanks.

I am very new to access programming.. I have worked with VB mainly in the past.. do you mean a FORM.CURRENT event or are you referring to something else?
 
Yes, I am referring to the Current event of the form.
 
RuralGuy said:
Yes, I am referring to the Current event of the form.

Thanks for that.. it worked a treat :)

Can I ask another quick question on the same topic.. I have a subform on this form, how can I check the value on a parent form in a subform.

I.e.

if parentform.Fieldname = 1 then

blah blah

Thanks
CJ
 
If Me.Parent.ControlNameOnParent = 1 Then
or you can go through the Forms collection:
If Forms!ParentFormName!ControlNameOnParent = 1 Then
 
RuralGuy said:
If Me.Parent.ControlNameOnParent = 1 Then
or you can go through the Forms collection:
If Forms!ParentFormName!ControlNameOnParent = 1 Then

Thanks ever so much on this.. your the best..

and is it just as easy to affect controls on a subform from the main form..

ie.

changebackground colour on the subform.

p.s. I promise this is the last question.. ;)
 
Thanks alot for this.... Great resource..

CJ.
 
Hi,
I'm struggeling with one part of referencing a subform.. how do you reference a subform that has spaces in the name.

ie.
I'm trying to do this

Code:
Me!Funding Subform CJ.Form!Detail.BackColor = 8421504

but it doesnt work
any ideas/
thanks
CJ
 
use in the VBA-code no spaces but instead '_'

So it should be:

Me!Funding_Subform_CJ.Form!Detail.BackColor = 8421504
 
Surround your name with [brackets]:
Me![Funding Subform CJ].Form!Detail.BackColor = 8421504

Do *not* use the underscore unless they are also in the actual name!
 

Users who are viewing this thread

Back
Top Bottom