- Joined
- Aug 22, 2012
- Messages
- 2
- Reaction score
- 0
Good Afternoon
I am hoping that somebody may be able to help me with a Run Time Error 2455 that I keep getting and I have no idea what is wrong. I am using Access 2003.
I have a form which has 20 fields I use to enter information about recipes.
This is frmINPUTRECIPES (record source is tblRECIPES)
On this form I have a command button which I want to use to transfer the content of 6 of these fields into similar named fields in another form, named frmFRIENDS .( (record source is tblFRIENDS). Clicking the command button runs the following event procedure.
Private Sub Command205_Click()
Dim stDocName As String
stDocName = "frmFRIEND"
DoCmd.OpenForm stDocName
Forms!frmFriend!NUMBER = Me.NUMBER
Forms!frmFriend!RECIPES = Me.RECIPES
Forms!frmFriend!BOOK = Me.BOOK
Forms!frmFriend!BOOKNUMBER = Me.BOOKNUMBER
Forms!frmFriend!BOOKCASE = Me.BOOKCASE
Forms!frmFriend!SHELF = Me.SHELF
Forms!frmFriend!PAGE = Me.PAGE
End Sub
When I click the command button I get the following message
Run-time error 2455
You entered a an expression that has an invalid reference to the Property Page
When I run DEBUG the error is shown to be with the last line of the code
Forms!frmFriend!PAGE = Me.PAGE
If I pass the cursor over the first part of the expression I get
Forms!frmFriend!PAGE = Null
When I remove the last line from the event procedure the procedure runs exactly as I wish. I have checked all the properties on both forms and both tables and I cannot see anything different for field PAGE to any off the other field properties. I have checked on line but cannot find anything that helps bearing in mind that I am a total novice at this. If anyone is a ble to help I would be very grateful
Thank you in anticipation
Martin Davis
I am hoping that somebody may be able to help me with a Run Time Error 2455 that I keep getting and I have no idea what is wrong. I am using Access 2003.
I have a form which has 20 fields I use to enter information about recipes.
This is frmINPUTRECIPES (record source is tblRECIPES)
On this form I have a command button which I want to use to transfer the content of 6 of these fields into similar named fields in another form, named frmFRIENDS .( (record source is tblFRIENDS). Clicking the command button runs the following event procedure.
Private Sub Command205_Click()
Dim stDocName As String
stDocName = "frmFRIEND"
DoCmd.OpenForm stDocName
Forms!frmFriend!NUMBER = Me.NUMBER
Forms!frmFriend!RECIPES = Me.RECIPES
Forms!frmFriend!BOOK = Me.BOOK
Forms!frmFriend!BOOKNUMBER = Me.BOOKNUMBER
Forms!frmFriend!BOOKCASE = Me.BOOKCASE
Forms!frmFriend!SHELF = Me.SHELF
Forms!frmFriend!PAGE = Me.PAGE
End Sub
When I click the command button I get the following message
Run-time error 2455
You entered a an expression that has an invalid reference to the Property Page
When I run DEBUG the error is shown to be with the last line of the code
Forms!frmFriend!PAGE = Me.PAGE
If I pass the cursor over the first part of the expression I get
Forms!frmFriend!PAGE = Null
When I remove the last line from the event procedure the procedure runs exactly as I wish. I have checked all the properties on both forms and both tables and I cannot see anything different for field PAGE to any off the other field properties. I have checked on line but cannot find anything that helps bearing in mind that I am a total novice at this. If anyone is a ble to help I would be very grateful
Thank you in anticipation
Martin Davis