[AccessD] Procedure on subform erroring out

John Clark John.Clark at niagaracounty.com
Thu May 6 13:56:05 CDT 2010


This is probably something easy, but I'm not getting it...
 
As I said, in a past post, I inherited this program, from another county. Well, I've basically re-written it now. Unless they know something I don't, I don't think theirs is working properly. So, I went a different way w/it. In short, I split things up into a student table, and a certificate table, w/the former being one single record for each student that comes in, and allowing for an indeterminate amt of certificates. So, I split up the main entry form to, and I am using a subform for this.
 
I made some changes...enhancements...to automate some things, but w/I went to run it from the main form, I got the following error:
 
"College can't find the form 'frmCert_sub' referred to in a macro expression or Visual Basic code."
 
I am assuming that this has something to do w/running this code being on the subform...basically, it just takes the "Credit Hours," upon exiting that field, and determines the "FTE" number, but checking against a table of values. It works fine, w/I run the subform alone, but not w/along w/the main form.
 
The really puzzling thing though, is that other similar code is running fine...I have nav buttons programmed there, I have a buttons that copy data to a column and relocate themselves, and I've got a test field that combines two other fields to make a unique code. This latter one is similar I think, to the one that isn't working.
 
Here is the code that isn't working...
_____________________________________________
Private Sub CredHours_Exit(Cancel As Integer)
 
If CredHours < 12 Then
    EnRollOpt = 2
Else
    EnRollOpt = 1
End If
 
Me.FTE = DLookup("numFTE", "qryGrabFTE")  <------- specifically, this line
 

End Sub
________________________________________________
 
 
And here is code that IS working...
 
__________________________________________________
 
Private Sub Text11_Click()
 
Text11.Value = Year(Certificate_Date) & Semester.Value
 

End Sub
 
Any ideas? What do I need to do to have it work w/running the parent form? I'm never going to be running it any other way actually.
 



More information about the AccessD mailing list