Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

After_Update Event not initiating

Status
Not open for further replies.

bozic12

MIS
Jan 23, 2003
48
US
Hi all,

I'm sure this is very simple, and I'm looking past the obvious. I have a command button that executes code to open a file browser. I then have a text box that populates with the chosen file path. This text box having it's value property changed via code and does not initiate the after-update, change, or dirty events. Does anyone know why this is, or how I can have code execute when this field is populated via code? If I manually type into this textbox, it does initiate the after_update event.

Thanks for any help offered.

Jeff
 
This behaviour is explained in the VBA help.
Provided the code populating the text box is in the same form you may consider something like this:
Me![TextBoxName] = the_chosen_file_path
Call Me.TextBoxName_AfterUpdate()

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PH,

Thank you for the reply. I see the direction you are going, and it makes perfect sense. I'm having syntax errors though. It automatically takes away the () (ie. Call me.cutter_no_AfterUpdate, not AfterUpdate()). This produces an Compile error of method or data member not found. This, along with all of my subs on this form, was automatically created as a private sub. If I remove private, and make is a regually sub, I get an invalid use of null error.

I can't just put the AfterUpdate code in the command button code because a user can type in the textbox manually if the know the value they need. The command button opens another form so the user can see their stored records and select the one they want. I suppose I could have the code in both locations, but obviously, I'm trying to reduce redundancy. I also suppose I could use a public function, but if there is an easier way, I'm open.

Thanks again for your help.

Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top