Private Sub Check39_AfterUpdate()
If Check39 = True Then
CheckboxTrue 1
Else: CheckboxFalse 1
End Sub
I am using Access 2003. I've tried everything I could think. Can anyone
help on this?
Thanks
Deenos
Do you have subs or functions called CheckboxFalse and CheckboxTrue
within the current scope?
--
Roy-Vidar
CheckboxTrue and CheckboxFalse are functions or subs in the above code.
Put your cursor on CheckboxTrue and right click and select "definition"
(you'll need to scroll down to near the bottom of the pop up menu). If
you get a message saying something like "Identifier under cursor is not
recognized" then that's your problem - CheckboxTrue is not defined
anywhere. Do the same to test CheckboxFalse.
It is likely that either or both of these functions is not defined.
When you select the check box Access is trying to follow the above code.
If it can't find CheckboxTrue or CheckboxFalse it says to itself "what
is this silly user trying to make me do? I just don't understand!" and
throws the error you are experiencing.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Public Function CheckBoxTrue(X As Integer)
Dim dbThe_Mothers_Circle As DAO.Database
Dim rstType As DAO.Recordset
Dim strSQl As String
Dim MCID As Integer
Dim Check As String
'adds mailing group number to recordset
MCID = Forms!Mothers_Information!MCID
strSQl = "SELECT * FROM Type_of_Participant_Info WHERE MCID = " & MCID
Set dbThe_Mothers_Circle = CurrentDb()
Set rstType = dbjoi.OpenRecordset(strSQl, dbOpenDynaset)
With rstType
.AddNew
.Fields("MCID") = MCID
.Fields("TypeID") = X
.Update
End With
rstType.Close
End Function
> But now i am getting this error message that the database could not
> find this form Mothers Information. The form name is spelt correctly
> and does exist. Here is the code:
> Dim MCID As Integer
> MCID = Forms!Mothers_Information!MCID
It's never a great idea to have actual spaces in an object, such as a
form or a control (text box, check box, etc) name. That said, try this:
Forms("Mothers Information").MCID
> I am so rusty with this stuff it isn't funny. Where would you recommend
> I go to learn ie. a school, Microsoft. I am in NY.
Depends on what your job is. I learned as I went, primarily by using
the help files (though these really, really suck in versions after
Access 97, which had an excellent help) and this newsgroup. Googling on
advanced google can help too, but there can be pitfalls if you pick an
out to lunch answer on a topic you're learning about. I would google
and confirm methods by asking here if you find multiple methods.
For google, see the current thread, "O.T. - Can I redownload a
particular thread I've deleted in Free Agent?" and fredG's first response.
A course could be a good idea to help you get started, for sure, but as
I am Newfoundland, Canada, I'm not familiar with NY state at all, sorry.
Best