Criteria in Access Project

Posted on 2004-10-11
Last Modified: 2010-05-18
I cannot suss out how to write the following criteria (which I used in .mdb) in an access project :


Sorry but I am a novice!
Question by:Prestigeres
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
LVL 11

Expert Comment

ID: 12276392
Need some more information. The example you gave is a perfectly reference in an adp. Are you attempting to use the field for query criteria? Are you referring to an open form?

Author Comment

ID: 12276797
As a query criteria... it displays "Data Type Error in expression" when I try to save it :(
LVL 11

Expert Comment

ID: 12277308
Could you please post your code? Thanks.
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now


Expert Comment

ID: 12279610
1. You need to have a form open when you run the query
2. You need to put the name of your form and the name of your field in place of the words FormName and FormFieldName. For example, if your form name is frmOrders and the field name is strItem, the following would be the criteria:

Hope this helps.


Author Comment

ID: 12285832
Nope its not having any of it - my code is as follows :

(Country being the name of the form and ddCurrency being the name of the combobox on the form)

I just dont get it.... is it anything to do with SQL Server?


LVL 11

Expert Comment

ID: 12288342
We still need the code in order to assist you. Could you please post the code for your query?

It might have something to do with the query string and what you are actually reading from the combo box, but I can't tell until I see the code.

Author Comment

ID: 12288558
I am sorry you are talking to an absolute thicko.... please show me an example and I will suss it out from there and post the code for you :)
LVL 11

Assisted Solution

Jokra_the_Barbarian earned 75 total points
ID: 12288741
From a different post, you should have some code similar to the following:
  strSQL = "UPDATE tblWWMSData SET tblWWMSData.[CONTACT INFORMATION] = [contact information] & Now() & ' ' & CurrentUser() & ': ' & [forms]![frmNotePad]![txtNewNotes] WHERE (((tblWWMSData.ID)=[forms]![frmNotePad]![txtID]));"

You probably have a select statement vs. an update. This is what I need to see in order to assist you. Thanks. -Jokra

Accepted Solution

leslynf earned 75 total points
ID: 12289744
Here is the deal. Your combo box may be showing text; however, the actually item in the combo box is probably the identifying number that is unique to that item that shows. You are trying to match the choice to a field in your query that is text, when the identifier is what you need to match.

Leslyn :)

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question