var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Code working in After Update but not in On Current?
I have this in my After Update box of the field:
Me.tbxFAMS_VEH_TYPE = Me.tbxVEH_TYPE.Column(1)
Me.tbxFAMS_SUV_JUST = Me.tbxVEH_TYPE.Column(2)
Me.tbxFAMS_PU_JUST = Me.tbxVEH_TYPE.Column(3)
Me.tbxFAMS_PRIM_APP = Me.tbxVEH_TYPE.Column(4)
Me.tbxFAMS_Zip = Me.cbxUnit.Column(3)
Me.tbxBILLING_CODE = Me.cbxUnit.Column(4)
Me.PILOT.Visible = (Left(Me.VEH_TYPE, 11) = "fire engine")
Me.BODY_MANUF_NMBR.Visible = (Left(Me.VEH_TYPE, 11) = "fire engine") Or (Left(Me.VEH_TYPE, 3) = "***") Or (Left(Me.VEH_TYPE, 3) = "ect")
and the On Current for the form has the EXACT same information. So why are my records not updating? It works if I do it manually, but at 3000+ records, I would rather it did it at all at once...
There really is nothing to update.
Originally Posted by
How are you doing it manually?
Not sure what you mean by do it all at once.
The on current event fires as a record is made current. This means is runs for only one record at a time.
This code works fine for a form in single view mode.
If you have a form in continuous or datasheet view mode, it will only change for the current (selected) record.
Is your form in single view mode?
I can't remember how, but I got it to work for all records in the the past. I solved the issue by just scrolling through all records and updating the info that way. Quick and dirty, but at least its done.
You probably ran an update query in the past. No form-based code is going to operate on all records (unless you're executing SQL or looping a recordset). As Boyd said, the Current event is only going to fire for a single record at a time.