473,387 Members | 1,891 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.

Form error code 2465

imrosie
222 100+
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 up another form (Orders). At first I got the error 2450 (can't find form). After trying to compile (or recompile and save), it began recognizing the form,,,, then it started giving me 2465, can't find the fields.So after reading some other similar forums, I changed the field names to the actual field names on the forms (both) because prior, I had the field names (i.e., [fullname] and [fullcustname]) as the REAl field names as listed in the tables(query) which were [CustomerName] and [CustomerName]......

Now it's gone back to 2450, can't find the table...Does anyone have a suggestion? Both forms are built on a separate query...Is that the problem?

thanks in advance
Rosie

Private Sub beginanorder_Click()
'The event to open the Order form with some controls filled in
Forms![Add an Order and Details]![thefullname].Value = Forms![Search Customer Record]![fullcustname]
Forms![Add an Order and Details]![TheCompany].Value = Forms![Search Customer Record]![acompanyname]
Forms![Add an Order and Details]![acustid].Value = Forms![Search Customer Record]![accountnum]
DoCmd.Close acForm, "Search Customer Record", acSaveNo
End Sub
Jun 5 '07 #1
4 2371
MSeda
159 Expert 100+
the code you posted doesn't actually contain a command to open the order form, is that form already open?
can you post the previous version of the code you mentioned when you got the 'can't find fields' error?
Jun 7 '07 #2
imrosie
222 100+
the code you posted doesn't actually contain a command to open the order form, is that form already open?
can you post the previous version of the code you mentioned when you got the 'can't find fields' error?
Hello and thanks up front for your inquiry,

No the form (Orders) isn't already opened. The button (cmd) on the 'Search' form is suppossed to open the Orders form complete with most of the controls information passed to it, so there's no retyping. the Button is called

'BeginOrder' and here's the original code:

Private Sub beginanorder_Click()
'The event to open the Order form with some controls filled in
Forms![Add an Order and Details]!Customers.[CustomerID].Value = Forms![Search Customer Record]![CustomerID]
Forms![Add an Order and Details]![CompanyName].Value = Forms![Search Customer Record]![CompanyName]
Forms![Add an Order and Details]![FullName].Value = Forms![Search Customer Record]![FullName]

DoCmd.Close acForm, "Search Customer Record", acSaveNo
End Sub

The difference is that I simply changed the code on first line of Forms! from ---- to:

Forms![Add an Order and Details]![fullname].Value = Forms![Search Customer Record]![fullname]

Note: fullname results from a row query which is: SELECT Customers.CustomerID, [FirstName] & ", " & [LastName] FROM Customers ORDER BY [FirstName] & "," & [LastName];

Also 'thefullname' is also a row query on the 'Orders' form too. thanks

so the code looks like this:
Forms![Add and Order and Details]![thefullname].Value = Forms![Search Customer Record]![fullcustname]
Forms![Add an Order and Details]![TheCompany].Value = Forms![Search Customer Record]![acompanyname]
Forms![Add an Order and Details]![acustid].Value = Forms![Search Customer Record]![accountnum]

DoCmd.Close acForm, "Search Customer Record", acSaveNo
End Sub

Any ideas? thanks
Jun 7 '07 #3
MSeda
159 Expert 100+
Add
Expand|Select|Wrap|Line Numbers
  1.  
  2. docmd.openform "Add and Order and Details" 
  3.  
before the first line of code. I'm not sure why you've gotten two different error messages but you need to open the form before passing the values.
Jun 9 '07 #4
imrosie
222 100+
Add
Expand|Select|Wrap|Line Numbers
  1.  
  2. docmd.openform "Add and Order and Details" 
  3.  
before the first line of code. I'm not sure why you've gotten two different error messages but you need to open the form before passing the values.
That fixed it MSeda,,,,,I don't know why I didn't add that line..thanks so much.

Rosie
Jun 9 '07 #5

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...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
7
by: Stu | last post by:
Hi, I have a combobox who's values change the recordsource of the form. Within this form, there is a subform, whos records also need to change pending the value in the combobox. I am able to get...
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...
11
blyxx86
by: blyxx86 | last post by:
I can't seem to get this figured out. I am trying to requery another form after adding new information to a table that a cboList is created from. So, I have a combo box that has Sales personnel,...
3
by: ontherun | last post by:
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...
3
by: ironoverload | last post by:
Hi there I found some code on this forum and tried to modify it but I have hit a wall and am receiving a run-time error 2465 ......"can't find field 'frmComments' referred to in your expression" ...
2
by: zufie | last post by:
I have an Option GROUP which produces 6 different report between two dates. A separate Option BUTTON determines the period of the report once I enter the From & To Dates into the textboxes. I...
4
by: zufie | last post by:
I have a main form containing a command SEND button that prompts an email form to pop up. The email address(es) that are supposed to appear on the email form are those corresponding to the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.