pre-processing entered data prior to updating the target field

peskywinnets

Registered User.
Local time
Today, 13:12
Joined
Feb 4, 2014
Messages
582
Tearing my hair out here (I've not worked with forms much, must be missing the point here!)

I'll keep it simple.....let's say I have a table with a field in it called "Barcode"

So I have a form setup with the field Barcode showing (ready to accept input)

What I want to do is take the data entered (it will actually be a scanned barcode), but only use part of the data ...and have extracted data that go to the target field called Barcode, so something like this...

MyBarcode = Mid(Trim(Barcode), 11, 11)
Barcode = MyBarcode

but I can't seem to get access to update the Barcode with MyBarcode.

I'm using the Before Update option & I get this error message....

Screenshot.jpg


....any tips please?
 
Try the after update event if you're changing the data.
 
Hi. Try moving your code to the AfterUpdate event...

Edit: Oops, too slow... Sorry for the duplicate information...
 
Thanks guys...that seems to have done it (I'm pretty sure I tried that earlier, but having spent quite some time on this my head is a bit fried so perhaps there was another issue at that point!)
 
No problem. We've all had the fried head at some point. ;)
 

Users who are viewing this thread

Back
Top Bottom