Subform not displaying current information

I

ivalum21

I have a form based on Classes, a subform based on Enrollements, and a combo
box within my subform based on SessionID.

When I choose a session for a student, it is saved into the table fine, but
it won't display if I go back to view the previous student.

I've tried going to the combo box's After Update event and adding
me.SessionID.requery to requery the combo box, but I get a message saying
that my database can't find the macro 'me'. I've also tried doing the same
thing to the subform, it gives me the same error message.

What's going on here??

ivalum21
 
6

'69 Camaro

I've tried going to the combo box's After Update event and adding
me.SessionID.requery to requery the combo box, but I get a message saying
that my database can't find the macro 'me'.

This code must be used in the OnAfterUpdate( ) event's VBA procedure, not in
the event property. To do so, select the On After Update Property's combo
box and select [Event Procedure], then select the Build button (...) to jump
to the VB Editor and type your code:

Private Sub SessionID_AfterUpdate()
me.SessionID.requery
End Sub

(Although I wouldn't recommend requerying the same combo box in its own
OnAfterUpdate( ) event, but perhaps you have a good reason for doing so.) As
for your original problem, are you sure that the LinkMasterField and
LinkChildField Properties are correct? Was there a one-to-many relationship
established between the two bound tables before the subform was added to this
form?

I would recommend that you post your future questions in the Getting Started
newsgroup until you become familiar with Access, because answers are geared
for new users in that newsgroup. Answers posted in the other newsgroups
expect that the questioner has more than just basic skills, so the answers
are geared for the more experienced skill levels. If you don't want to heed
my advice, you'll find yourself wasting a lot of time requesting that the
too-vague instructions be explained to you. You'll also find that you have
to wait longer for answers because so many of the experts who could have
answered your question just skip it -- because they know that it will take
four or five posts (or more) to explain an issue in precise detail that would
have needed only two or three sentences to suggest the solution for someone
more experienced.

You'll find the Getting Started newsgroup on the following Web page:

http://www.microsoft.com/office/com...ft.public.access.gettingstarted&lang=en&cr=US

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
 

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

Top