Criteria Entry To Call Combo Box

Nov 7, 2005

Hi can anyone help please.

I have a form where users can specify crtieria for a query. The value that the user enters via a combo box on a form is entered in a query. The user then hits a button to run the query.

Problem is the entry i have in the criteria of the query that links to the form is not quite right. It work for when they enter a value but causes problems when they leave it blank. I currently have:

Like (IIf(IsNull([Forms]![Main]![CBGroup]),"*",[Forms]![Main]![CBGroup]))

CBGroup is the name of the combo box and this expression sits in the criteria of the group field.

If the user does not enter a value in the combo box i want the query to return all the records, including where the field is blank. However at the minute it only returns the records where there is any value, not the blanks as well.

The expression above works fine with Text boxes but not combos.

Sorry for the essay, thanks if you read down this far.

HELP!

View Replies


ADVERTISEMENT

Criteria Is Passed By Function Call

Aug 10, 2007

Dear Access Query Expert

I have created a query which has a function call as the criteria for one of the numerical fields. The function returns a string expression such as .....

1) 132 OR 142 OR 156
2) 132 OR 142
3) 132

..... into the criteria section of the numerical field.

Unfortunately, the query doesn't work if the criteria is generated by the function call. However, if I hardcode the criteria (don't send a function call but directly write 132 OR 142 OR 156) the query works.

I am puzzled and I am not sure how to solve this problem.

Thank you so much.

View 1 Replies View Related

Forms :: Combo Box To Verify With Last Entry And Display Other Options Than Last Entry

Sep 8, 2013

I am working on creating an access database for tracking physical assets linked to locations. I need to make a combo box list to show items other than the current location of the asset. Basically I need it to refer to last enery of the user and define the new possible entries. so we have a unique relationship between location and asset. The assets and location will always remain fixed and there is never going to be any addition. I am creating a web form so that it can be uploaded into sharepoint.

View 3 Replies View Related

Modules & VBA :: Static Shell Function Call Works But Dynamic Call Fails

Sep 4, 2013

I'm having to recode some old MS Access DBs so they will run in the following environments:

Office 2000 on WinXP
Office 2003 on WinXP
Office 2010 on WinXP
Office 2000 on Win7
Office 2003 on Win7
Office 2010 on Win7

When I wrote my code for Office 2000 on WinXP things were simple because directory paths were the same across all computers and I could hard code pathing when using a shell command to launch other files.

My new approach is to make a function call to the Windows registry to determine the default executable and path for opening a file based upon its extension (see apicFindExecutable in basWindows API module).

I'm able to use code to create a shell call and debug print it to the immediate window. If I put my cursor in the immediate window at the end of the shell call and hit [enter] the external file will open as desired. If I try to open the external file directly through code, I get a file not found error.

To recreate the error take the following steps:

(1) browse to files that are accessible from your computer
(2) click the PREPARE DATA AND OPEN MAIL MERGE DOCUMENTS command button

Shell function call is made by the fnOpenFile function located in the basOpenFile module. There has to be a trick here that I'm missing.

View 5 Replies View Related

Multiple "Where" Criteria For Call Arrivals

Mar 24, 2006

I have two tables: one that has (in part) call data from calls to a call center. The data includes the initiating (or calling) number/Start Date of the call/ Start Time/End Time/Duration, as well as City and State (abbreviation) of origin.
I also have a table that includes time zones by state (abbreviation) [ie ME (Maine)= Timezone 1 and CA (California) = Timezone 4 in the US.]
I am trying to parse the data by developing a query to break the call arrival into 1/2-hour increments. I.e. I want to see the total number of calls arriving by sum of calls by state (time zone) each 1/2-hr.
When I set the criteria statement as "Start Time" Where (and in the criteria section) >#1:00:00 PM# And <#1:30:00 PM# the query fires off providing the required data. However, if I add the addtional OR statement >#3:00:00 PM# And <#3:30:00 PM# for instance, the query dies.
I need to establish a parsing mechanism that, in a single query, takes the data from any date range and breaks it into 1/2-hour increments to determine where the calls are coming in from and how the pattern changes during the day (or over time). Thank you, in advance, for any assistance you may be able to provide.

View 1 Replies View Related

Setting Query Criteria To Be 'blank' Depending On The Criteria Of A Combo Box

Oct 21, 2006

I have set up a database that stores actions (i.e jobs). In the table; two of the fields are...'required completion date' and 'actual completion date'. I wish to lookup, by using a query, all of the open actions (those which havent yet been complete (i.e the 'actual completion date' is null)) and then later on all those which are overdue (i.e the 'actual completion date' is null And the 'required completion date' <today....this being the criteria for an overdue action).

However, I have used a form which has a combo box which contains the values open and overdue. When a selection has been made I want a form to display with the results depending on the selection that has been made. I am capable of creating a form based on a query, but am unsure of how to construct the query with the correct criteria based on the option that is selected from the form.

Any help would gratefully be appreciated. Thanks

View 5 Replies View Related

How To Get An Automatic Entry Based On Criteria

May 9, 2007

My database tracks individuals qualifications. These qualifying scores relate to Unqualified, Expert, Advanced etc. What I want to do is add a entry into my roster table which will have the qualification score.
I then want to have the score and actual qualification (Advanced, Expert, etc) in a Report.
The qualification type is a range (less then 30, 31-40, 41-50), and I think that I will need a BETWEEN statement. What I am not sure of is how to put this together to make it equate the number with the equivalent word in a report.

Thanks
the brewmeister

View 3 Replies View Related

Using Subform Entry As Criteria In A Query

Nov 14, 2012

I have the following Form and Subform. Form name is "100-Select Form". Subform name is "103-Report Dates". Within the subform I have two fields I'm using, "Start Date" and "End Date'.

In my query I have a date field. I want the query to read from the Subform (if I open the subform directly my criteria listed below works, but when the main form is open, my query doesn't seem to be able to read from the subform).

Here is the criteria I have in the date field of my query: >=[Forms]![103-Report Dates]![Start Date] And <=[Forms]![103-Report Dates]![End Date]

I have a feeling that I somehow should be pointing my criteria first to '100-Select Form', and then to '103-Report Dates' within that form, but I'm just not sure how to write this and nothing I'm trying is working.

View 2 Replies View Related

Modules & VBA :: Multi Criteria DLookup - Return ID Number Of Entry

Dec 4, 2013

I am trying to make a DLookup function to return the ID number of an entry that matches 2 or 3 criteria but I am struggling to get the syntax correct for the second and third criteria.

Here is what I have so far:

1 criteria, works fine =DLookUp("[timedata]![id]","timedata", "[processdone] =" & Forms![Mainform]![p11] )

2 criteria, works fine =DLookUp("[timedata]![id]","timedata", "[processdone] = " & Forms![Mainform]![p11] & " And [timedata]![BGSnum] = 1001" )

BGSnum is a numerical value but it changes for each form I load, so what I want to do is use the form location value as the criteria.

E.g.

=DLookUp("[timedata]![id]","timedata", "[processdone] = " & Forms![Mainform]![p11] & " AND [BGSnum] = ' " & Forms![Mainform]![BGS] & "' ')

and possibly a third criteria too. This is where I am having problems and the syntax is wrong so MS Access wont let me save the macro.

View 6 Replies View Related

Filter By Combo Box Entry

Dec 14, 2007

Hi,

I have a form with a list box that is filtered by the entry made into a combo box. It works fine except that I want an option which shows all records in the list box. I tried using the formula below in the query criteria for the list box but it returns no records when I select All in the combo box. Why won't it work? Is there a better way to do this? Can anyone help?

IIf([Combo32].[Value]="All",Like "*",[Combo32].[Value])

View 4 Replies View Related

New Data Entry From Combo Box

Mar 10, 2006

Hi guys,

I'm looking for a little bit of help here. I have a form and on this form I have a combo box. Now this combo box is populated by a table that I have called "Options". So this is all fine and dandy to select items already existing in the table, but ideally I would like to be able to input a new "Option" through this combo box if it doesn't exist in the table already.

I'm thinking I'd have to do something with the "On Not in List" event but I don't know VBA at all.

Also, I will eventually have a Price box next to this combo running off a query driven by the entry in the combo box. Again, I'd like to be able to input a new cost to the existing item or a cost for the newly entered item

Thanks in advance for the help

Nathan

View 14 Replies View Related

Choose From Combo-box, Or Manual Entry. Help!

Apr 6, 2005

Can't seem to figure this out.

I built a db for tracking and entering sales info but I'm having a problem with one of my combo boxes. To make entering data easier, I created a combo box that you can select a sales persons name from, then based on who is selected, their Title and Office location also populated.

The problem I have is when I want to manually type in the Name and other info for a temporary sales person. How can I allow users to choose from the drop down or just type it in if that person is not in the list?

Thanks in advance for your assistance.

View 1 Replies View Related

Combo Box: Restrict Data Entry

May 6, 2005

Hey,

I have several list combo boxes on my form that I want to prevent users from adding data to. How can I do this? For example, there is a list box for insurance carrier, etc. :confused:

Thank you,

debo

View 4 Replies View Related

Custom Combo Keypress Entry

Mar 28, 2006

hey guys, i have this code which will let you type into a combo box "db" and it will pick out the selection "Die Cut / Back Slit". the following code works except for an error message coming up before it goes into the code.

"the text you entered isnt an item in the list"

anyone know how i can get around this? i tried turning warnings off on the sub but it seems to happen by default before the sub?


Code:Private Sub cmbCut_KeyPress(KeyAscii As Integer)' if pressed not enter or tab , add to a string then select value from entered chars'enter or tab key pressed (added delete and space keys to miss adding to string)If KeyAscii <> 13 And KeyAscii <> 9 And KeyAscii <> 8 And KeyAscii <> 32 Then enteredChars = enteredChars & Chr(KeyAscii)Else DoCmd.SetWarnings False Select Case enteredChars ' get letters entered and set value from combo Case "S" Me.cmbCut.Value = Me.cmbCut.ItemData(0) Case "B" Me.cmbCut.Value = Me.cmbCut.ItemData(1) Case "D" Me.cmbCut.Value = Me.cmbCut.ItemData(2) Case "DB" Me.cmbCut.Value = Me.cmbCut.ItemData(3) Case "T" Me.cmbCut.Value = Me.cmbCut.ItemData(4) Case "F" Me.cmbCut.Value = Me.cmbCut.ItemData(5) Case "FS" Me.cmbCut.Value = Me.cmbCut.ItemData(6) Case "FC" Me.cmbCut.Value = Me.cmbCut.ItemData(7) Case "FSC" Me.cmbCut.Value = Me.cmbCut.ItemData(8) Case Else 'do nothing End Select enteredChars = "" DoCmd.SetWarnings TrueEnd IfEnd Sub

View 1 Replies View Related

Updating Table From A Combo Box Entry

Oct 22, 2007

I am learning access on my own, so please bear with me.
I am using Access 2000.
I have a form with a combo box. I use this form to enter data into the database. The combo box selections are from a separate table. If the required entry is not in the drop down menu selections from the table, the user needs to type in the proper selection. If this happens I want the table driving the combo box dropdown to be automatically updated with the new entry so that the data will appear in the drop down menu selections the next time. How is the best way of accomplishing this. Thanks for any answers and examples.

View 4 Replies View Related

Forms :: Data Entry With Combo Box

Mar 31, 2014

In my database I have the following:

tables
-course
-programme
-trainer
-trainercourse

relationship
-trainer to course (many to many)
-course to programme(many to one)

I have created an input form to add new trainer. In the input form i have combo box to enter trainer's course n trainer's program.

Each time i save a new record. A new data is created in the course and program table. I dont want that to occur. I want the data to be saved in the trainer query with the existing course and program.

View 4 Replies View Related

Forms :: Combo Box With Blank Entry

Aug 7, 2013

I have created a form that searches through one of my tables, via a query, it then automatically creates a report from that query.

I want to add an option into the combo box's that is blank.

Currently if you wanted to choose by 'fault category' but accidently click on 'failure analysis', it will take the top value of the combo as the entry, you can't then blank 'failure analysis'.

Each combo box gets its information from an independent table.

The only think I figured out what adding the refresh button which just closes then reopens the form so all the fields go blank.

View 14 Replies View Related

Help With Combo Box Selection Being Determined By Entry In Another Field

Feb 7, 2008

first of all, i'm new to access. the only experience i have with it is reading the "microsoft office inside out", access section, and doing some research on the web.

i work for a school district and my boss has asked me to make a database with all our assets. i used to have everything in excel, but he prefers access, so here i am. what i'm wanting help with is making a combo box that lists manufacturers like hp, dell, etc., and then having the next field show a list of models depending on what was selected in the manufacturers field. so if i select dell, i want only dell models to show up in the combo list for models.

i can make the combo lists, but i don't know how to make it so that the entry in one field affects the list in another field. i've tried putting in lookup values, i've tried doing it with expressions in queries, and a few other things. i've tried searching google, and the forums and i've found things that are kind of similar to what i want, but doesn't do exactly what i want. so here i am...is there a simple way to do this? this isn't required of me, but now it's driving me crazy because that's the way i'd like to have it but i can't figure it out.

i'd appriciate any help with this.
thanks.

View 4 Replies View Related

Forms :: Update Combo Box For Entry In Another Form?

Feb 3, 2014

I can't work out how to update the selections available in a combo box as follows: I use a combo box in a main form to select a record (yacht) If it's a new yacht then I use an event linked to a button to call another form to add the new Yacht On exiting the Yacht Maintenance form I return to the main form The combo box in the main form doesn't list the yacht i just added unless I exit and re-load the form

I'm not sure of the best way to refresh the combo box selections or main form without exiting.

View 1 Replies View Related

Forms :: Combo Box In A Form For Data Entry

Jun 3, 2015

I want a combo box in a form for data entry. Is the best method in doing this creating a new combo box in the form and linking it to a table, or using a lookup field in my table?

View 14 Replies View Related

Forms :: Combo Box On Data Entry Form

Oct 9, 2013

I'm trying to create a Data Entry only form based on a small table called tblProject.

It consist of the fields Project_ID, Artist_ID, Project_Name, and Project_Notes.

I used the wizard to get me started and i know how to change the form to data entry only, but the problem is the vague data in the Artist_ID control. It shows up as a number, because it is an FK to another table (tblArtist) where more details on the artist are held. (including Band_Name)

I want to be able to make it a combobox with a list of the Band_Names from the tblArtist table. This would make creating "a new project" much easier.

View 4 Replies View Related

Forms :: New Combo Box Entry To Add Record In Table

Nov 19, 2013

On a form to enter some new client info, I want users to be able to select their UserID from a combo box for future reference to other users (ie; Who made these notes?). For various reasons I want them to be able to add their UserID to the combo list for future selection if its not already on there.

There is a table set up for users, simply called tblUsers, with a single field, UserID. A query from this sorts the list alphabetically, and the combo uses this query to populate its list - qryUserID.

Users can currently select from a list or write their own UserID in the box, however when they write their own ID it doesn't get saved.

I don't need any message boxes or checking, just add it and move on kind of thing. It doesn't need to refresh the list immediately, as the user moves on swiftly once completing 2 more fields.

View 11 Replies View Related

Forms :: Limit Data Entry To One Of Four Available Combo Boxes

Apr 29, 2015

I have a form with four combo boxes on it, the four boxes all open the same form and return a record based on the selection from a different column from the same query.

To make it work smoothly I think I need to make it so it is only possible to enter data in one combo box at a time. I could also do with some error handling.

View 2 Replies View Related

Forms :: Combo Box Tied To Any Control - Adding Third Entry?

Jul 17, 2013

I have a combo box that is not tied to any control but uses a value list as the row source in the data tab. My question is... it currently holds two names but I am wanting to add a third but when I do the third name does not appear like the first two in the form view. The first two show:

Last Name, First Name, employee #

And the third shows
Last Name, First Name

employee #

And on the third entry... the first name shows where the employee # should be

View 6 Replies View Related

Access 2003 Form - Combo Box Will Not Accept Any Entry

Nov 30, 2011

I am using Access 2003 and I am having trouble with a Combo Box on a form.

I had a combo box (based on a table), storing the choice in a field in the query and underlying table the form is based on. Everything was working fine, until... I altered the form based on a query. Now when you make a choice from the drop down list you get an error bell and nothing happens.

View 4 Replies View Related

Forms :: Select From Combo Box During Data Entry And Automatically Update Field

Mar 13, 2013

I have one field AccountName in customer table and another field AccountID.

In my form I would like to select from the combo box AccountName during data entry and then have the AccountID automatically update in the Account ID field.

View 2 Replies View Related







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