473,509 Members | 2,528 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Send return to a form field from VBA

489 Contributor
My form has a field where user can scan a barcode. If the barcode is on file then the form is filled out with the barcode information, this is done in the After Update procedure. If the barcode isn't setup in the barcode table the user is taken to another form so they can set the barcode up. When the users is returned to the original form the barcode is in the barcode field, is there a way to fire off the code in the After update procedure.
Thanks for any help
Oct 26 '16 #1
1 807
jforbes
1,107 Recognized Expert Top Contributor
You could move the code in the AfterUpdate Event into a new Public Method on the Form. Then call the new Method from both the AfterUpdate and the procedure that does the barcode magic.
Expand|Select|Wrap|Line Numbers
  1. ' On the Form that you enter the Barcode
  2. Public Sub fillFormFromBarcode()
  3.     ' The code currently in the AfterUpdate
  4. End Sub
  5. Private Sub txtBarCode_AfterUpdate()
  6.     Call fillFormFromBarcode()
  7. End Sub
  8.  
  9. ' Then from the procedure that sets-up the barcode,
  10. ' Test to see if the Form is open,
  11. ' then run the new method.
  12. If CurrentProject.AllForms("TheBarcodeForm").isLoaded Then
  13.     Call Forms("TheBarcodeForm").fillFormFromBarcode()
  14. End If
Oct 26 '16 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
5700
by: ratlhead | last post by:
Hey all, I've provided a form for a client of the company I work for that basically emails the form data to an email address. Only a couple of the many fields are required...nothing too fancy....
1
7421
by: Newbie | last post by:
OK, this may be impossible since I'm using 3rd party shopping cart ASP software, but I've been able to finagle a lot of other stuff I thought wouldn't work, so here we go: I'm using a form in...
2
1959
by: Gary | last post by:
Morning all, I have a form field called: Bsk01 How do I onBlur prompt the user to enter a ZERO as character one, if one is not already entered. At the same time, I would like to ensure at...
3
5926
by: Steve Wright | last post by:
I want to build an email subject containing text and a form field. Have have got so far but all I seem to be able to do is generate another page in the browser with a text string. (code attached)...
4
3884
by: GavMc | last post by:
Hello I am new to internet programming and wonder if anyone can help me with this.... I am trying to pass a hidden field value on a form into another field on the form so that it can then be...
3
28996
by: MX1 | last post by:
I have a query written in MS Access that has a few calculated fields. Is it possible to refer to that query in a form field. I'd like the form field to show the sum of one of the columns from the...
9
3311
by: William Wisnieski | last post by:
Hello Everyone, Access 2000 I have a main form with a continuous subform. On the main form I have a text field called . It gets populated based on what the user selects in a field on the...
14
1722
by: AtomicBob | last post by:
I have been given an interesting task: Make a page with a single form field, which is to take a name (first and last), and regardless of case or whether there is a space between the first and...
1
3363
by: AR123 | last post by:
The mandatory form field that is not working is the TYPE OF ILLUSTRATION. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Proforma</title> <meta...
1
2269
by: Keith Pastorek | last post by:
So I have a form that has an array passed in. When generating the online form, I loop through the array and create the same text boxes for each value in the array. So my text boxes (relating to...
0
7233
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7410
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5650
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3201
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
440
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.