Requery or Repaint?

jwindon

Registered User.
Local time
Today, 20:35
Joined
Aug 12, 2001
Messages
531
I created a form based off a query of two similar tables (tblDistrict) and (tblT2Coordinators) that draws in mailing information from tblDistrict thru a combo box.

I want to have the option to enter the Mailing Address if different from the one given in tblDistricts.

I did an event on the combo to:

Me.MailingStreet=Combo1.Column(2)
Me.MailingCity=Combo1.Column(3)

to automatically set the value in those fields.

It worked the first time I tried it, but now that I am basing the form off a query, it does NOT.

Do I need to do somekind of requery or repaint with the Event as well? I looked under the help files, but they are difficult for me to understand. Could you provide the Code?

I want the other fields (based off table
 
Well, I think I found my problem. First off I had my column count wrong.
Secondly...somehow the fact that the DistrictID in T2Coordinators was a lookup of tblDistrictID was interfering. I had to add a command to update THAT lookup field as well and then it allowed me to set values.

Weird!!?!?!?!

I would still like to know what requery and repaint could do for me. I have another Dbase that could use that. A record is added to a table from a form from a command button on another. I want the other to show the new record when the user closes the "add" form. I don't know why is won't.
 
REPAINT:
Display related, only repaints the picture on the screen, useful for graphics.

REFRESH:
Refreshes the forms current information.

REQUERY:
Requery the entire recordset, so if you were working with a dynamic query you could requery to show the 'new' results.
 

Users who are viewing this thread

Back
Top Bottom