Trouble With Creating Proper Criteria Selection In Table With LookupWizard

Dec 7, 2005

Hey I am trying to create a query that selects only certian values within a field in the based table. Easy ehough. HOWEVER, the field in the table that I am trying to select certian values from is a LookupWizard. So in that one field, there is a drop down box with one other value for a total of two values in one field.

So I am at a loss for how to properly select things using the criteria in a query. Ive tried Criteria: Like "value" for both values in the look up wizard,but no luck.

any help is appreciated!

View Replies


ADVERTISEMENT

Trouble Extracting Field From Table Based On 2 Criteria

Jun 30, 2005

Hi all,
Been pulling my hair out about this for a while, so i hope someone's feeling kind:


http://www.agga.dsl.pipex.com/pics/AWF01.gif

I'm using the BHRefPrefix to build part of a reference number. The Principal and Site exist on a separate form, and i need to use both as criteria in order for the correct BHRefPrefix to be returned.

I sort of get it working using two joins, but it doesn't let me add any new records. I've tried straight queries, queries with DLookup expressions, and i just can't get what i need.

Pete

View 3 Replies View Related

Trouble With Between Criteria In Parameter Query

Oct 8, 2007

In MS Access 97 I have a basic query based on a single table. When I use "Between [Start Date] and [End Date]" as the criteria in a date field it returns incorrect records.

It works correctly on date fields that are not calculated but not on the date field that is calculated. If I type in the actual dates in the criteria (instead of the prompts) it returns the correct records.

Is there a solution to this behaviour? I need the users to be able to input the dates.

Thanks.

P.S. I have tried using the base query as a subquery but I still have the same issue in the second query based on the subquery.

View 5 Replies View Related

Converting An Entire Table To Proper Case

Apr 27, 2005

I am trying to change all the fields of a table from All Caps to Propercase. I have used strconv propercase before, however only on a field by field basis. I have about 5 or tables that I have to do this to and am trying to save the typing. I know I can do this with a recordset (easily in asp), but am not familar enough to do this in vba. Can you do a for each fld, like in asp, or am I going at this the totally wrong way. I tried using an update query with the *, but access doesn't like that too much. Any help is greatly appreciated.

Thanks,
Josh

View 1 Replies View Related

Queries :: Creating Unmatched Query Based On Selection From Two Combobox

Apr 15, 2013

I created 2 combobox that list specific table in a data base. I want to create an unmatched query based on the selection from those two combobox.

All field in those table are the same.

View 3 Replies View Related

Using A Combo Box Selection For Query Criteria

Nov 1, 2006

I have a report that is based on a query. In the query, I have a field called "Mode". In the criteria section for the Mode field, I am calling the selection from a combo box on a form called "frm_main". So the criteria for the Mode field is "[Forms]![frm_Main]![Mode_ComboBox]". This combo box has selections for 1,2,3,4,5. I want a selecton on the combo box that will work with the query to show all modes. Sometimes something weird gets entered into the database like "NoMode" for example. I have tried adding a combo box selection of "*" , "Is Not Null" and "". If I manually type these into the criteria section of the query, it works fine. But when I use these in the combo box and call the combo box selection from the query, it does not work.

Does anyone have any idea what I can use in my combo box selection that when selected, the query (and hense report) will show all data?

Thanks,
Jim

View 5 Replies View Related

General :: Automate The Row Selection Criteria?

Apr 8, 2015

I have access database as FE and teradata and peoplesoft as BE. In access database, i have a table with 5 columns and around 50,000 rows of data. I need to create the pass through queries such that it selects the first row from the access table as a where clause and export the query results in excel format or access table. The query should then go to the 2nd row as a next where clause and append the results in the same excel sheet or table.This process need to continue for all rows in the access table.

View 14 Replies View Related

Forms :: Creating Lookup - Populate Contact Number Based On Selection From Combo Box

Mar 31, 2015

I want to create a text box within a form that automatically populates a contact number based on a selection from a combo box, also in the same form.

For example, I have a Bidders Table (tblTenders), this form includes information regarding the Tendor like the company name and a main contact within that company and a phone number for that contact.

I've created a separate table for all the contacts called tblContacts. This table holds all the contact information for each contact. I have a simple form called frmTenders that asks the user to input the Customer (which is the company who are bidding) and the Main Contact, which is a combo box to select the main contact from tblContacts. Below that combo box is a text box called 'Contact Number' - I want this box to display the contact number for the main contact automatically when a main contact is selected from the combo box.

The contact number text box isn't storing that information in any tables etc. It's just for viewing purposes when we need to make a call to that specific tender.

View 5 Replies View Related

Queries :: Add Date Selection Criteria To Query?

Sep 11, 2014

Below is the SQL for a query I have, which returns events that are scheduled for today, I need to change this so that The user can specify events to be displayed in a date range and If possible only show those events for the users windows ID

Code:

SELECT tblEvent.EventStart, tblEvent.EventOwner, qryCompany.Company, ltDescriptionType.Description
FROM (tblEvent INNER JOIN qryCompany ON tblEvent.Company = qryCompany.ContactID) INNER JOIN ltDescriptionType ON tblEvent.EventDescrip = ltDescriptionType.[DescriptionType ID]
WHERE (((tblEvent.EventStart)=Date()))
ORDER BY tblEvent.EventStart, tblEvent.EventOwner;

View 2 Replies View Related

Date Selection Criteria - Show Last Day Of The Every Month

Apr 16, 2015

I have a big list of data, with a row of data for every day for each client.

I need a selection criteria that will provide show the last day of the every month (historic data) for each client.

I've had a go but I'm not making much progress.

View 4 Replies View Related

Problem With ComboBox Selection To Drive Query Criteria.

Jun 8, 2007

Hi, I have been reading through the forum and found alot of really interesting stuff but cannot seem to find the answer to my specific problem. I'm sure it's easy but i'm sick of trying to figure it out now.

I am trying to build a form to display a shift rota. My tables contain daily shift patterns for 6 staff members for 2007. I want to build a form that has a subform displaying the rota for a particular analyst and a control in the master form to select which of the 6 staff members you wish to view. I have built a master form with a combo box. The combo box holds the names of the six staff and gets this data with a select statement in the Control Source field from the employee table. I constructed this with the wizard. I have constructed a query to drive the sub form. The query builds the rota, getting data from my tables but gives all shifts for all dates for all staff . I want to restict this in my subform to all shifts for all dates but for 1 member of staff. The member of staff should be defined by the selection made in the combo box in the master form. I then have a statement in the criteria of the query driving the subform to restrict the results by name to the name selected in the master form combo box. I'm sure this should work as i have used similar methods in the past. The statement in the query criteria reads like this:

[forms]![frmRota].[cmbAnalystSelect]

this is in the field of analystName, so the criteria should find all instances where the value in the analystName field matches the value in the cmbAnalystSelect control. However, the query always returns no results.

When i run the quey i have already opened the form (frmRota) and selected a value for cmbAnalystSelect, so the quey should collect the value from the combo box and filter the result according to the criteria but it seems to filter out all the results. If i run the query without first opening the frmRota form then i am prompted by a dialog box to enter a value for [forms]![frmRota].[cmbAnalystSelect]. If i enter a corresponding correct value (a valid name for a member of staff) the query returns a correct set of results, i.e. all shift patterns for all dates for the selected member of staff. When i have the form already opened i am not prompted for a value by the dialog box which would suggest it is at least recognising the form is open and that the control is there.

The last thing is that my ComboBox control is not bound to anything, when i view the control in design view it says it is unbound. I have nothing in the control source for the ComboBox. In the row source i have a select statement to pick out the employee names from the employee table, this then poulates the list in the ComboBox.

I hope this is enough info for someone to understand my problem and offer some advice, i can elaborate, attach screen shots etc. if needed.

Thanks in advance for any advice you can offer.

View 4 Replies View Related

Queries :: Alter Selection Criteria Of A Query From A Form

Nov 25, 2013

I have a form that runs off a query that displays further details of a record in a datasheet when you double click on a row.

The query itself has criteria that looks at the open form and selects the correct record.

My question is can you change the results of the query either using vba or a built in feature of access without having to use a separate query.

The selection criteria in the query is:

Forms]![Main]![Ordering-Supplier]![Ordering-Order List].[Form]![suppOrderID]

Basically I want to override the resulting data with another record when I run an event on the form.

View 3 Replies View Related

Queries :: Expression Asking For Parameter - Date Selection Criteria

Jul 31, 2013

I'm trying to create an query that has two separate expression in it and a date selection criteria. The first expression is,

Expr1: DateDiff("s", [Arrival Time 1],[Departure Time 1])/3600

and the second is,

Expr2: IIf([Expr1]>[Hours Per Day],[Expr1]-[Hours Per Day]

When I run this query it asks me for the date (which is fine) but then it also pops up a box asking for "Expr1". How can I get "Expr2" to use the value returned from "Expr1"?

View 3 Replies View Related

Reports :: Selection Criteria - Date Range To Be Queried

Sep 18, 2014

I have a report based on a query that returns all info from the query which is fine, I now need to amend this so that individual users can specify the date range to be queried and the person for whom the results are required (one of the query strings)...

View 1 Replies View Related

Forms :: Running A Query Based On User Selection Criteria On Form

Jan 9, 2014

I have a form which lets the user enter a contract ID and then a combo box that has a list of reports which run against whichever ID is entered.

What I want to know if I put the ID's in a table if theres a way to allow the user to select multiple ID's in one go and run the report against them the range rather than 1 at time?

I'm thinking about utilising the check/tick boxes would this be possible? or another way?

I'm using 2003 and have some VBA ability.

View 5 Replies View Related

Tricky Table Trouble

Feb 3, 2008

Ok, I have a table that contains a number of yes/no fields depending on location.

There are two main parts of my db that use this, one is users (for their departments) and the second is changes (for secondary locations)

I want to have two fields in the table used to reference a set of locations. Meaning i can reference the table and get locations where userID = 3 or alternativly where ChangeNumber = 6

Can somebody help me in making this work. Im currently having issues with duplicate values etc

View 3 Replies View Related

Trouble Linking Table Fields

Dec 14, 2004

Hello,

I created a sys admin database and the big problem I am having is linking the hostname field in table 1 to the hostname field in table 2. I have tried making both fields primary keys, I have tried creating a relationship to the two fields between the two tables. I have tried adjusting the join types.

Yet, no matter what I try, the hostnames from table 1 will not populate in table 2. I have even tried adding a new hostname to see if it would populate and it won't.

any ideas?

Thanks,

stillabeginr

View 2 Replies View Related

Passing Parameters Thru Combo Selection: ERROR:Data Type Mismatch Criteria Expression

Oct 17, 2006

I am trying to pass parameters to my qury thru my combo selection. I keep getting this error "Data type mismatch criteria expression", does anyone have an idea why?
WHERE (((fShiftWorked([tblTimeLog].[timeStart])=[Forms]![frmOperatorWorkDone]![cboShift] Or IsNull([Forms]![frmOperatorWorkDone]![cboShift]))=True));


I have spent so much time onthis already and i am sick of it :mad:


Attached is my db. Please help me out here.

View 2 Replies View Related

Creating Labels Report With (TimesToRepeatRecord) Criteria

Dec 7, 2014

In my database (db) I have first create simple report which can print label for certain article in number of times user wants to. That part of db is marked as OldLabels in db that I have attached below.

Now, I plan to update this code via form NewLabels so user could choose more than one article and for each article he can define 'TimesToRepeatRecord' number. Unfortunately, I am little confused how to achieve this. This is the old code (from Report) which have done most of the work.

Code:
Option Explicit
Dim intPrintCounter As Integer
Dim intNumberRepeats As Integer
Private Sub Report_Open(Cancel As Integer)
intPrintCounter = 1
intNumberRepeats = Forms!VPDEKLARACIJE!TimesToRepeatRecord

[Code] ....

I have also attached db named "Demo" so you could see the issue.

[URL] .....

View 1 Replies View Related

Modules & VBA :: Creating Label Report With (TimesToRepeatRecord) Criteria

Dec 7, 2014

In my database (db) I have first create simple report which can print label for certain article in number of times user wants to. That part of db is marked as OldLabels in db that I have attached bellow.

Now, I plan to update this code via form NewLabels so user could choose more than one article and for each article he can define 'TimesToRepeatRecord' number. Unfortunately, I am little confused how to achieve this.. This is the old code (from Report) which have done most of the work

Code:
Option Explicit
Dim intPrintCounter As Integer
Dim intNumberRepeats As Integer
Private Sub Report_Open(Cancel As Integer)
intPrintCounter = 1
intNumberRepeats = Forms!VPDEKLARACIJE!TimesToRepeatRecord

[Code] .....

I have also attached db named "Demo" so you could see the issue. [URL] .....

View 1 Replies View Related

Trouble Updating Parent Tables With Child Table/form

Jul 6, 2006

Sorry this is so long but I am trying to make it as detailed as possible...

The Setup

My database is similar to the sample "Service Call" db. I have a main table called "tblTT" which has an autonumber primary key. The table also contains several foreign keys such as UserID (not an autonumber) from "tblUser", TechID (also not an autonumber) from "tblTech", etc. I have the relationships setup with "Enforced Referential Integrity" for both updating and deleting records. Each relationship has a RIGHT OUTER JOIN ("Join 3" in access) so that all records from child (tblTT) and only equal from parent (tblUser, tblTech, etc.) will be included. I have a form for nearly every table which serves different purposes but the main function of the DB is to create new Trouble Tickets (TT's), a.k.a. service calls. Therefore the main form used is my "frmTT" form in add mode. The form contains all the fields from my "tblTT" table and contains (directly) no fields from any other table (I guess indirectly it contains fields from all the parent tables...).

The Problem

When I pull up "frmTT" and try to create a new Trouble Ticket for a user that does not yet exist in the table "tblUser" I get the error "You cannot add or change a record bcause a related record is required in table 'tblUser'".

What I want is for my users (the "Techs") to be able to create a new Trouble Ticket without having to worry about populating the "tblUser" table (and other parent tables) first.

My Solution

I was going to (and unless someone can find an answer for me still will) fix this using VB script by setting up a query to check all the parent tables for the values in their corresponding fields in the form. If the query returns no results an "INSERT INTO" statement will run to populate the parents tables so that the form will save itself into the Trouble Ticket table ("tblTT").

I feel that this is a huge work around and not the proper fix. I would prefer to do this the right way both to have a correctly setup DB and for future reference. Can anyone help me with this?


Thanks,
Andy

View 3 Replies View Related

Forms :: DMax Criteria - Creating A Form To Input New Return Parts Into Database

May 22, 2013

I am currently creating a form to input new return parts into a database. I am trying to automatically generate a tracking number (##-AA-####-####). I have gotten myself to generate the ##-AA-#### in a list box and almost was able to generate the sequence number, 0001, 0002, etc. using the dmax function. I would like to generate the sequence number one higher than the highest, depending on part type and last 4 digits of part number. Our parts have unique last 4 different p/n but more than one can fall under the same type.

View 14 Replies View Related

Forms :: List - Values From A Table Depend On Selection From Different Table

Jul 23, 2015

Situation: 3 tables. Manufacturers, Countries & Provinces/States. 1 Form for data entry in Manufacturers.

Countries table contains ID, Country and CountryCode fields. i.e. 47, Great Britain & GB

Provinces/States table contains ID, Province/State and CountryCode. as in 1, Alaska and US.

In the form the country is easily selected from a list refering directly to the Countries table.

Problem: How to make a list in the form from which the user can simply select the province for the country that has previously been selected. And not a list with all teh provinces and states from every country in the world. (This would be a really really long list...)

View 3 Replies View Related

Proper Relationships

Jun 2, 2005

And I thought this would be easy. I am trying to make a db of storytelling kits for my workplace. I thought it would be easy. 3 tables. Link. Make a form with the kit details and 2 subforms where I'd enter all the books for each kit and all the activities associated with the kit. Each page would show only the books/activites that the kit contained.
Pfft.
None of that worked so I'm going to be a real dummy and ask what to do with my relationships.
So far I have

Kit
-ID
-Name
-Genre (lookup table, non changeable values)
-Location
-BookID
-ActivityID

Book
-ID
-Title
-Author
-Format (lookup table to another table)

Activity
-ID
-Name
-Description
-Materials
-Age Group

Format
-Description

Format is linked to book (cause it was just so I could have an easily updated lookup). Activity and Book are both linked to Kit. Each kit has many activites and many books (fine) and I'm tempted to just leave it as each book only has one kit (even though that may not be the case in the future). How do I set it up so that it works? I enforced referential integrity but that screwed up my form by telling me that I couldn't enter data into the kit area until I'd entered it into the book area which was useless as we enter the kit details and then find things to add to it.

Any ideas...just in general.
Sorry to be a pain yet again.

View 2 Replies View Related

Proper Closing Of Database

Jan 25, 2006

I recently created a database and installed buttons to properly close the database to avoid coruption of files etc. However I could not find a way to eliminate the X button in the upper right corner of access. Today my dbase crashed, I presume because someone did not use the buttons I installed, and just closed using the X in the upper right corner of access. The database is on a network, and was not password protected at the time. It will be when it is restored, however I would still like to know if there is a way to eliminate the x button in the upper right hand corner so that users will have to use the buttons created to properly close the database.

View 4 Replies View Related

Convert To Proper Case

Apr 12, 2007

This is kind of a weird question. I downloaded and imported a table with cities and zip codes in it. All the city names are in upper case. I want to use the city names in that table as the row source for my City text box.

But in my database, I store city names in Proper Case, with just the first letter capitalized. So when I use the table as the row source, it pulls in the city name all in upper case

Is there a way, either within Access or not, to change the city names in that table to Proper Case?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved