Hello everyone,
I have created a search button but I receive the message "Microsoft Access can't fine the field "|" referred to in your expression" when I try to use it. I have looked online for this error but the fix did not pertain to this problem because the table or field name did not match any reservered Access words as described.
My records search form will have two combo boxes and one or two search buttons. I am just trying to get one to work before I even create the 2nd combo box.
What I want is the command button to run a query and return any records that match what is in the combo box.
For Example:
My combo box is named CboTitleSearch
My command button is named CmdSearchByTitl e
Combo Box is selecting from the table "Titles List".
Command Button is querying the table Created_Submitt ed
If I select Cuckoos in the combo box I want to click the search button and have everything in the table the query hits with the title of Cuckoos returned.
Here is the code:
=============== =============== =============== =======
Private Sub CmdSearchByTitl e_Click()
On Error GoTo Err_CmdSearchBy Title_Click
Dim stDocName As String
stDocName = "Created_Submit ted_Query"
If [Forms]![Records_Search]![CboTitleSearch] = [Created_Submitt ed].[Title] Then
DoCmd.OpenQuery stDocName, acNormal, acEdit
End If
Exit_CmdSearchB yTitle_Click:
Exit Sub
Err_CmdSearchBy Title_Click:
MsgBox Err.Description
Resume Exit_CmdSearchB yTitle_Click
End Sub
=============== =============== =============== =======
I think that the more look at this the more confused my little brain gets. Any help would be greatly appreciated.
Thanks,
Doug
4 10364
Sorry it should read Microsoft Access can't find the field "|" referred to in your expression". I had fine instead of find in the subject line.
Hello everyone,
I have created a search button but I receive the message "Microsoft Access can't fine the field "|" referred to in your expression" when I try to use it. I have looked online for this error but the fix did not pertain to this problem because the table or field name did not match any reservered Access words as described.
My records search form will have two combo boxes and one or two search buttons. I am just trying to get one to work before I even create the 2nd combo box.
What I want is the command button to run a query and return any records that match what is in the combo box.
For Example:
My combo box is named CboTitleSearch
My command button is named CmdSearchByTitl e
Combo Box is selecting from the table "Titles List".
Command Button is querying the table Created_Submitt ed
If I select Cuckoos in the combo box I want to click the search button and have everything in the table the query hits with the title of Cuckoos returned.
Here is the code:
=============== =============== =============== =======
Private Sub CmdSearchByTitl e_Click()
On Error GoTo Err_CmdSearchBy Title_Click
Dim stDocName As String
stDocName = "Created_Submit ted_Query"
If [Forms]![Records_Search]![CboTitleSearch] = [Created_Submitt ed].[Title] Then
DoCmd.OpenQuery stDocName, acNormal, acEdit
End If
Exit_CmdSearchB yTitle_Click:
Exit Sub
Err_CmdSearchBy Title_Click:
MsgBox Err.Description
Resume Exit_CmdSearchB yTitle_Click
End Sub
=============== =============== =============== =======
I think that the more look at this the more confused my little brain gets. Any help would be greatly appreciated.
Thanks,
Doug
Denburt 1,356
Recognized Expert Top Contributor
The following line doesn't make any sense and could be throwing a curve to MS Access as well.
If [Forms]![Records_Search]![CboTitleSearch] = [Created_Submitt ed].[Title] Then
What the heck is [Created_Submitt ed].[Title] and where is it located?
[Created_Submitt ed].[Title] is the table and field I am trying to compare the form field. I have another form that creates an append query. There will be multiple records for a certain title in this query. The append query is called Created_Submitt ed. On this otrher form I have a button to pull up the Records_Search form.
I have tried using Me![CboTitle Search] instead of [Forms]![Records_Search]![CboTitleSearch] but that gave me the same problem.
The following line doesn't make any sense and could be throwing a curve to MS Access as well.
If [Forms]![Records_Search]![CboTitleSearch] = [Created_Submitt ed].[Title] Then
What the heck is [Created_Submitt ed].[Title] and where is it located?
Denburt 1,356
Recognized Expert Top Contributor
[Created_Submitt ed].[Title] is the table and field I am trying to compare the form field. I have another form that creates an append query. There will be multiple records for a certain title in this query. The append query is called Created_Submitt ed. On this otrher form I have a button to pull up the Records_Search form.
I have tried using Me![CboTitle Search] instead of [Forms]![Records_Search]![CboTitleSearch] but that gave me the same problem.
Unless you have that table opened in another form you will need to open it or access it through code using dlookup("Title" ,"Created_Submi ted","Title = " & [Forms]![Records_Search]![CboTitleSearch]) or an openrecordset utilizing what ever necessary criteria. although Dlookup can slow things down a bit it can be a handy function for accomplishing some tasks.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Sean Anderson |
last post by:
It seems I lack an understanding of varible (sorry, field) scope and need
human feedback. I have read 5 books on java and everything in the help of
my development tool says this should work fine, here are the details:
TextEdit package
Public TextEdit class
Public TextEdit() method invokes Frame1
Public Static main(String args)
|
by: Mark DuPrey |
last post by:
I've got a script in an ASP page that is supposed to extract certain
files from a zip file, move them, create a new zip with the moved
files and then make a self-extracting archive out of the new zip file.
I'm doing this using wshShell.Exec, the WinZip command line tool and
zip2exe.exe from the pkware suite (because WinZip's command line
doesn't support creating self-extracting archives and for historical
compatibility reasons). This is...
|
by: s_gregory |
last post by:
The mdb is considerable size 70 +- mb. A complex union query was
working well, but when an additional union select... was added into
the query, selecting identical fields from a different source, it
began to have problems.
Failure was observed only in a few PC's at first. For example, in an
NT 4.0 SP6 PC, it continued to work OK. But in my Win 2k laptop, it
failed. As the union query was gradually simiplified in testing, the
failure...
|
by: Andrew McNab |
last post by:
Hi folks,
I have a problem with an MS Access SQL query which is being used in an
Access Report, and am wondering if anyone can help.
Basically, my query (shown below) gets some records from a couple of
tables in my database using INNER JOINS and the WHERE clause to
specify the required constraints. However, I also want to read two
fields from a *single* record from a table called 'Locations' and then
apply one of these field's values...
|
by: J |
last post by:
Hi,
Ive got 3 forms, (a subform within a subform within a form) and when I
refresh the outermost form, Access closes and offers to send an error
report.
The forms worked fine a few weeks ago, but now they cause this error
in Access 2002 (Access 2000 is fine)
Each of the sub forms use values from their parent forms to produce
results.
| |
by: Hans Nieser |
last post by:
I was wondering wether it was normal that I get "field is never assigned
to" warnings after defining a struct but not having actually referred to
it in my code yet. Is this just something I'll have to ignore or am I
doing something wrong here?
TIA
|
by: wcamp |
last post by:
I would like a "field list" to appear in report design.
Clicking the "filed list" icon nothing happens.
Have tried dozens of ways to get a "field list",
so far no luck! Have created over 5 ACCESS dBases in the past 3 years.
What i want now is the simpleist Table and Query both have the same 9
fields. The report will be very simple, but no can find "field list".
Any help will be much appreciated. William (Bill) Camp
|
by: kcdoell |
last post by:
Hello:
I have the following afterupdate event:
Private Sub GWP_AfterUpdate()
'Updates the Total calculation in the control "SumGWP" on the quick reference
'table that is located on the form
With Me!
DoCmd.Requery
|
by: Adem |
last post by:
C/C++ language proposal:
Change the 'case expression' from "integral constant-expression" to "integral expression"
The C++ Standard (ISO/IEC 14882, Second edition, 2003-10-15)
says under 6.4.2(2) :
case constant-expression :
I propose that the case expression of the switch statement
be changed from "integral constant-expression" to "integral expression".
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |