Hey all,
Recently, I renamed my forms and my tables to have numbers in front of them (mostly to establish a temporal order in my forms). I had a code which worked when the form names didn't have numbers in front of them... However, upon adding numbers to the form names (and trying to update the VBA respectively), the VBA no longer executes.
The code I was running was:
From this code, I got the following error:
I've got to ask: does Access not like people to put numbers in their forms? What is the correct syntax for referencing to forms in this manner?
Recently, I renamed my forms and my tables to have numbers in front of them (mostly to establish a temporal order in my forms). I had a code which worked when the form names didn't have numbers in front of them... However, upon adding numbers to the form names (and trying to update the VBA respectively), the VBA no longer executes.
The code I was running was:
Code:
If Forms![13-frm_Transportation].Transport_DryGoodsCollectedAtSameTime.Value = "0" Then
CODE HERE
Else
Forms![13-frm_Transportation].Transport_DryGoodsCollectedAtSameTime.Value = "1"
CODE HERE
End If
End Sub
I've been running into this type of problem with all of my forms -- VBA code which previously worked, but referred to other forms in some manner (include opening said forms), no longer work when numbers are added into the form names!Run-time error '2450'
Microsoft Office Access can't find the form '13-frm_Transportation' referred to in a macro expression or Visual Basic code.
I've got to ask: does Access not like people to put numbers in their forms? What is the correct syntax for referencing to forms in this manner?