How to get after-update to run with transferred data (1 Viewer)

Gkirkup

Registered User.
Local time
Today, 05:14
Joined
Mar 6, 2007
Messages
628
I have two forms that are not linked. A barcode is read on one of the forms and I want to transfer that barcode data to the second form, to avoid having to scan the barcode twice.
This works fine as far as it goes. I use IsLoaded to make sure that the second form is loaded, then transfer the barcode data to the barcode field on the second form.
My problem is that it just sits there, and even if you press Enter on the second form's barcode field, the after update code does not run. How do I get the after update code to run on the second form so that the barcode can be processed?

Robert
 

JHB

Have been here a while
Local time
Today, 14:14
Joined
Jun 17, 2012
Messages
7,732
First set focus to the control, then put the barcode in the control's Text property.
Something like below:
Code:
...YourBarcodeControl.SetFocus
...YourBarcodeControl.Text = TheBarcode
 

missinglinq

AWF VIP
Local time
Today, 08:14
Joined
Jun 20, 2003
Messages
6,423
Code:
...YourBarcodeControl.SetFocus
...YourBarcodeControl.Text = TheBarcode

That's not going to work, because when a Control is populated using VBA code, the events associated with the Control do not fire!

You'll have to actually Call the AfterUpdate event in order to get it to fire, in this situation:

Code:
YourBarcodeControl.SetFocus
YourBarcodeControl.Text = TheBarcode
Call YourBarcodeControl_AfterUpdate
Linq ;0)>
 

JHB

Have been here a while
Local time
Today, 14:14
Joined
Jun 17, 2012
Messages
7,732
That's not going to work, because when a Control is populated using VBA code, the events associated with the Control do not fire!
Oh yes it works. If you use the Text, it does fire.
 

missinglinq

AWF VIP
Local time
Today, 08:14
Joined
Jun 20, 2003
Messages
6,423
I stand corrected! No events fire, that I can find, if the Control's Value Property is changed through code...but they they all appear to using the Text Property...interesting!

Thanks for the info!

Linq ;0)>
 
Last edited:

Users who are viewing this thread

Top Bottom