473,387 Members | 1,590 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,387 software developers and data experts.

Error 2465 while opening a form

hi,

i have two forms CHS_Customer and 'CHS_Job'
both have a common field, "Company_Name"

i want to open the form 'CHS_Job' from the form 'CHS_Customer ' and when i open, the Company_Name field value in 'CHS_Customer' but be assigned to Company_name field in 'CHS_Job'

i have written some code for the button "Enter Job" in the Form 'CHS_Customer '

Private Sub EnterJobLabel_Click()

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

DoCmd.OpenForm "CHS_Job"
DoCmd.GoToRecord , , acNewRec

[Form_CHS_Job].Company_Name.Value = Company_Name.Value

End Sub



the above code gives run time error 2465: Access cant find the field ' I ' referred to in the application.

I have checked the fields and there is nothing wrong.

what would be the problem??
need your assiatance

thanks n regards,
Kathy
Jun 18 '07 #1
3 2448
kepston
97 Expert
I think this
Expand|Select|Wrap|Line Numbers
  1. [Form_CHS_Job].Company_Name.Value = Company_Name.Value
should be
Expand|Select|Wrap|Line Numbers
  1. Forms![Form_CHS_Job]!Company_Name.Value = Company_Name.Value
Jun 18 '07 #2
puppydogbuddy
1,923 Expert 1GB
hi,

i have two forms CHS_Customer and 'CHS_Job'
both have a common field, "Company_Name"

i want to open the form 'CHS_Job' from the form 'CHS_Customer ' and when i open, the Company_Name field value in CHS_Customer but be assigned to Company_name field in 'CHS_Job'

i have written some code for the button "Enter Job" in the Form 'CHS_Customer '

Private Sub EnterJobLabel_Click()

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

DoCmd.OpenForm "CHS_Job"
DoCmd.GoToRecord , , acNewRec

[Form_CHS_Job].Company_Name.Value = Company_Name.Value

End Sub



the above code gives run time error 2465: Access cant find the field ' I ' referred to in the application.

I have checked the fields and there is nothing wrong.

what would be the problem??
need your assiatance

thanks n regards,
Kathy
Hi Kathy,
When you have more than one form opened at the same time, you need to use fully qualified references as shown:

Change this:
[Form_CHS_Job].Company_Name.Value = Company_Name.Value

To this:
Forms![Form_CHS_Job]!Company_Name.Value = Forms!CHS_Customer!Company_Name.Value
Jun 18 '07 #3
Kepston and Puppy,


U guys rock... man, it solved the problem ..

thanks guys..thanks a lot...

take care

chuz,
Kathy
Jun 19 '07 #4

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

Similar topics

1
by: JMCN | last post by:
hello i receive a runtime error '2465' whenever i run my module in access 97. it says 'Run-time error '2465' OOB Reports can't find the field "DuplicatePayments' referred to in your...
5
by: Lyn | last post by:
Hi, this has been driving me nuts. I'm on Office 2003 SP1, Win XP SP1. I am opening a form with a number of subforms based on various tables. The subforms are populated via the main form's...
6
by: Squirrel | last post by:
I have a command button on a subform to delete a record. The only statement in the subroutine is: DoCmd.RunCommand acCmdDeleteRecord The subform's recordsource is "select * from tblVisit order...
3
by: MIG | last post by:
I had a form which used year(date) to compare an input value with the year of today's date. This was working fine. Now, for some reason, I am getting run-time error 2465 "Library Catalogue...
6
by: MLH | last post by:
"The following unexpected error occurred in Sub CopyMySQLbttn_Click, line #250, CBF on frmVehicleChooserform. 2465: "Can't find the field 'forms' referred to in your expression. You may have...
1
by: chris | last post by:
I have a form that is labeled Document Control. On this form it calls an API Function to browse for a folder, puts its in to the text box and allows you to create a table out of the folders...
7
by: Bob Darlington | last post by:
I'm using the following routine to call UpdateDiary() - below: Private Sub Form_BeforeUpdate(Cancel As Integer) On Error GoTo Form_BeforeUpdate_Error Call UpdateDiary(Me!TenantCounter,...
4
imrosie
by: imrosie | last post by:
Hello all, Yes, another newbie...HELP please. I have a problem compiling a procedure on a form. The 'search customer' form was built on a query. The proc is attached to command button which opens...
1
by: Gilberto | last post by:
Hello I have a big BIG problem. Im new with acces and ive been creating a db for a month now. It was working perfectly and just after i did a db SPLIT some functions began displaying error 2465. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...

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.