473,394 Members | 1,971 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Delete record - error You entered an expression that has an invalid reference...

15
Hello,

Once I delete a record on a form (form has a subform) using a button available on a ribbon the following error window is displayed:
„You entered an expression that has an invalid reference to the property Form/Report“ – the error is display in a window with OK button only.
It is displayed after either OK or Cancel button is pressed, when delete confirmation dialog box appears.

I have already gone through a few posts but I haven’t found a clear answer.
I already assumed that it might have something to do with referencing forms using “Parent” property. I changed “Parent” to “Forms!....” but without any change.

The line which triggers errors is:
Expand|Select|Wrap|Line Numbers
  1. F.requiredField_label.Visible = False
This line is in the following procedure


Expand|Select|Wrap|Line Numbers
  1. Sub subHideLabelForReguiredField(F As Form)
  2. 'some code here
  3.     If intNumberOfOrderedItems <> 0 Then
  4.     F.requiredField_label.Visible = False
  5.     Else
  6.            F.requiredField_label.Visible = True
  7.     End If
  8. 'error handling code here
  9. End Sub
  10.  
Appreciate any hints.

Access 2007
Jan 8 '15 #1
1 1207
twinnyfo
3,653 Expert Mod 2GB
Try:
Expand|Select|Wrap|Line Numbers
  1. F.Form.requiredField_label.Visible = False
Jan 8 '15 #2

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

Similar topics

3
by: Uwe Range | last post by:
Hi to all, I am displaying a list of records in a subform which is embedded in a popup main form (in order to ensure that users close the form when leaving it). It seems to be impossible to...
2
by: Arnold | last post by:
Hey there, I just put the following code: DoCmd.GoToRecord , , acLast in the On Open event of my form, which has 2 subforms. The following error message appears when the form now opens: ...
0
by: John Hunter | last post by:
I've recently had a nasty problem with the "Invalid reference to the property Form" error in subforms - nasty because it doesn't seem to consistently happen to all forms which contain the same...
4
by: barbara_dave | last post by:
Hi all, We have a Access database used by multiple user. For some reason the database get a "Error" record. When doing search or record pointer point to this record, we get run time error...
8
by: deviii | last post by:
Hi VB experts I have one problem while connecting database . when i run my form it shows the error BOF or EOF record error. but i entered data in database. I used the condition Do until...
3
by: MyWaterloo | last post by:
I am trying to open my purchase orders form and go to the last record. In the on open command I do: DoCmd.GoToRecord , , acLast Seems straight forward enough...but I keep getting this message...
1
by: Steven Hayes | last post by:
I am trying to convert this excel expression into an Access expression: =IF(OR(B79="",B62="", H7=""),"Required Fields Incomplete",IF(AND(F87<20000,OR(J87>P14, B87>P37)),"Yes, this is a HIGH COST...
3
by: P Terry | last post by:
I have a main form with three nested subforms (Main to Level1 to Level2 to Level3). I am attempting to access the Level2 form and continually receive an error message run time #2455 - "You entered...
0
by: msk2020ckp | last post by:
I created two accounts in Authorize.Net site. but both are not working properly. when i give my login id & password it display "The Login ID or Password entered is invalid. Please try again." ....
1
by: Chelle8263 | last post by:
Hello, I am trying to add a field from another table using the lookup wizard. However, Access will not allow me to add this field using the lookup wizard. This message pops up, "You entered an...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.