Refresh form after field is populated

esskaykay

Registered User.
Local time
Today, 03:09
Joined
Mar 8, 2003
Messages
267
Hello,

I have frmGrades with a command button that opens frmAddress based on a query that selects records per key-in. When frmGrades is opened in ADD mode, I open frmAddress to find parcel number (ParID) that corresponds to the keyed in address. ParID is then inserted into tblGrades.

This is all working fine. However, after clicking the Accept button on frmAddress that inserts the parcel number into the field ParID, it does not display the new entry. If I close frmGrades and reopen in VIEW mode the field is populated and visible.

Is there a way with the form in ADD mode, once the field ParID is populated, for it to display and ultimately update other fields based on what’s in ParID? As a test, I placed a command button in frmGrades coded with:

Me.Recalc
Me.Repaint
Me.Refresh
DoCmd.RepaintObject
DoCmd.Requery (this caused a problem)

Any other suggestions would be greatly appreciated.

Thanks,
SKK
 
What problem did you get with requery and where did you put it?

regards John

P.S Did you try variation Me.Requery?
 
When I requery, it returns a blank form (in ADD mode). I also tried (with same results):

Forms!frmGrades.Form.Recalc
Forms!frmGrades.Form.Refresh
Forms!frmGrades.Form.Repaint
Forms!frmGrades.Form.Requery

SKK
 
Can't quite grasp what your doing especially why you would transfer information directly to the table and not through the data entry form? Could you possibly attach an example so I could have a look at the DB structure.

John
 
John,

Thank you very much for you concern. I believe I have a work-around. I created a command button (cmdGIS) with OnFocus coded as SendKeys “{Enter}” and the OnClick with my requirements. Once the Address button looses its focus, it goes to cmdGIS which in turn runs my requirements. I would have thought this was easier than this but not being a programmer, I guess I have to proceed thusly.

I have attached a ZIP file with screenshots of the app as it proceeds. I could send the entire MDB but it’s quite large and again, not being a programmer, probably quite convoluted. If I have any more concerns/problems can I readdress this with you?

Thanks,
Steve Kipping
 

Attachments

Yeah no problems if it works cool would have used OpenArgs to pass values from one form to another rather than directly manipulate the tables or use a Dlookup function to retrieve the information from a table for that field in the form but hey... "whatever works" ;)

Just let me know if you want to try a different approach John :)
 
Sound fine. Thanks again John...

Talk to you tomorrow,
SKK
 

Users who are viewing this thread

Back
Top Bottom