Open a form

G

gorro

I dont know how this will work, but i believe in you out there!
I want to design a situation where one will user upon keying an id will open
a form which which is the query of a whole class.

As an instance, is Geography Teacher enters an id, all students in a class
offering Geography will be queried on a form for data entry.

Thanks for Helping.
 
T

Tim Johnson

If I'm understanding you correctly, try this:

Using your example below, first, create the form based on a query for your
students table; do not limit the criteria to any specific class id with the
data entry fields you would like to include. For this example, name it
frmStudentsInClass

Open a separate form in design mode; create an unbound text box and name it
txtClassID. This will be where the teacher enters the id to search for.
Place a button next to the textbox and name it cmdOpenClassForm. In the
properties tab for the button, select the "..." next to the OnClick button
and use the following code:

Private Sub cmdOpenClassForm_Click()

DoCmd.OpenForm "frmStudentsInClass", , , "[ClassID] = " & Me.txtClassID

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

Similar Threads


Top