Refresh Code in Subform w/ Rec Change?

Ceejay64

Bass Playin' Biker Chick
Local time
Today, 14:50
Joined
Oct 2, 2002
Messages
74
I have searched in vain for the answer to this problem, so here goes...
I am building a db here at work that requires users to start a record with certain information about a job, then later, add to that record. There are a *LOT* of fields, so I have split things up into 3 tables. So far, so good.
When the user needs to add to an existing record, they do a search that may result in more than one record that matches the criteria. The "add" form opens and displays the records with nav buttons allowing them to scroll through to the one they want.
The form loads, and the code in the subforms (where the additional info will be entered) behaves perfectly for the first record, but never changes when the record is changed. This is a real problem as it is designed to disable boxes with fields that already have data, check off operations that are already complete, etc. If these items are not the same on the other records (most likely not...), the user is stuck with the first set of "form instructions" and can't properly complete the record.
My hands are also a little tied as to the interface as the folks who requested the db want it to look as much like the old paper form as possible, but also want it as mistakeproofed as possible, hence the disabling and the like.
I have tried, among a host of other things, an 'onclick' on the nav buttons to call a sub running the same code that is in the subform load, but keep getting errors telling me that it can't find the textboxes, etc.
I'm running out of patience. Long story short: Does anyone know of a way to refresh the subform code along with the data when the record changes???
Thanks in advance!
~Ceejay64
 
Got it!

Hey - I figured out a way to do it. Not to mention a repair in my code (oops!). Anyway, thanks for the vent space. :p Writing it "out loud" seems to have helped me sort it out.
~C
 
Hi CeeJay, I hav a simular problem and was wondering what you did to fix yours?
Thanks, Jake
 
I wrote a bit of code in the subform with all the "if" statements that I wanted, and called it on the form's "on current" event.
That seemed to take care of most everything.
 

Users who are viewing this thread

Back
Top Bottom