F
Frazz
I am a reasonably experienced programmer (at least I thought I was), however
I am new to Access/VBA and visual basic in general. I am used to working in a
*nix environment, etc etc.
My question is this:
I am designing a database that is for managing students in a class. There
are roughly 450 students in the class. Each has a unique student ID that is
the primary key.
What I am trying to accomplish is this: I have a form that contains text
boxes for the most common information needed for each student. i.e Last Name,
First Name, Birthdate, etc.
I want to be able to type the students id into the text box corresponding to
their ID and have the rest of the textboxes populate with their information.
seems like it should be easy enough, yet it is not (or I am barking up the
wrong tree).
I have tried making the ID box in the form an unbound box and using the
following code in it:
dim frm as Form
Set frm = Forms![Form_I_need]
frm.RecordsetClone.FindFirst " [textbox_value] = " & Me![searchable_fieldname]
frm.Bookmark = frm.RecordsetClone.Bookmark
according to information I got from assorted help resources
this should populate the "form_I_need" info with the info about the student.
In this case I get an error (error 2450 : cant find the form "Form_I_Need")
I know the form is there, yet I cannot get it to open. I have double, triple,
and quadruple checked the spelling, form name, etc.
In debugging, I even tried to write an event procedure that simply opens the
form. Still get error 2450.
So my question, in two parts is:
1.) What is the best way to write the code I am trying to write to use the
textbox to search for students?
2.) Why is it not able to find the form specified in the code and giving me
a 2450 error?
Of course the 2450 error resolution may solve everything if my code is right.
Help.
I am new to Access/VBA and visual basic in general. I am used to working in a
*nix environment, etc etc.
My question is this:
I am designing a database that is for managing students in a class. There
are roughly 450 students in the class. Each has a unique student ID that is
the primary key.
What I am trying to accomplish is this: I have a form that contains text
boxes for the most common information needed for each student. i.e Last Name,
First Name, Birthdate, etc.
I want to be able to type the students id into the text box corresponding to
their ID and have the rest of the textboxes populate with their information.
seems like it should be easy enough, yet it is not (or I am barking up the
wrong tree).
I have tried making the ID box in the form an unbound box and using the
following code in it:
dim frm as Form
Set frm = Forms![Form_I_need]
frm.RecordsetClone.FindFirst " [textbox_value] = " & Me![searchable_fieldname]
frm.Bookmark = frm.RecordsetClone.Bookmark
according to information I got from assorted help resources
this should populate the "form_I_need" info with the info about the student.
In this case I get an error (error 2450 : cant find the form "Form_I_Need")
I know the form is there, yet I cannot get it to open. I have double, triple,
and quadruple checked the spelling, form name, etc.
In debugging, I even tried to write an event procedure that simply opens the
form. Still get error 2450.
So my question, in two parts is:
1.) What is the best way to write the code I am trying to write to use the
textbox to search for students?
2.) Why is it not able to find the form specified in the code and giving me
a 2450 error?
Of course the 2450 error resolution may solve everything if my code is right.
Help.