Correct Order In Combo Box

Mar 3, 2005

Very simple question:

How do I make the results of a query which I am displaying in a combo box appear in order.

e.g. 1 then below that 2 then below 3 then below 4 etc

even though I may have entered the details in a different order. I've tried doing it order by ascending and decending but this doesn't work.

Many thanks

Paul.

View Replies


ADVERTISEMENT

Modules & VBA :: Combo Box Will Not Display List In Correct Order

Nov 3, 2014

I have code attached to a command button to fill a Combo Box with data from a music collection. A letter of the alphabet is entered into a Text Box then records beginning with that letter are copied from a table, either by Artist or Title. They are saved to a temporary table at which time they are in no particular order. Those records are copied to a further table and saved in alphabetical order. This table is then used to fill the Combo Box.

I used two temporary tables because the records were not displayed in the correct order. I hoped this might cure it, it did not. The records are in order in the table but not in the Combo Box.

Code:
Private Sub Command68_Click()
'SEARCH AND FILL COMBO BOX
On Error GoTo errTrap
DoCmd.SetWarnings False
DoCmd.RunSQL "DELETE * FROM tempList;"

[Code] .....

View 3 Replies View Related

Modules & VBA :: SQL Where Clause - Open Form To Correct Work Order?

Aug 25, 2014

Windows 7
Access 2013

I've been trying to work up a where clause that is generated by a button click event on a report. The workflow that i'm trying to obtain is as follows:

1) A report is run to determine the remaining work orders that need to be processed.
2) A button that is placed on that report is to be clicked, taking the user to the form associated with that work order, so it can be processed.

What i've been able to do so far is capture the unique ID for the work order and then print that in a message box. I can then open the form.

What i haven't been able to accomplish thus far is to open the form to the correct work order.

Things I've tried : I started trying to use the macro with the search for record option and using the where clause. Not successful. I am a little more comfortable in using vba so i switched to that pretty quickly.

Code:
Private Sub btnJobEntry_Click()
'GOAL: open the work order form to the correct entry
'METHOD: store the uniqueID to a variable, then use that in the open command's where clause
Dim strJobID As String
'store the unique ID in the variable

[Code] ....

I've put the strJobID variable in both the filter and where clause sections of the DoCmd but it just opens the form to the first entry. I'm fairly confident i'm not applying the filter/where clause correctly by using the incorrect syntax.

View 3 Replies View Related

Accessing Correct Combo Box Column From Query

Jan 4, 2008

Hi everyone,

I have a combo box that is populated from a table called tblProducts.
There are only three fields ID, Model and Description in this table.

ID is the primary key field and is an Autonumber

In the form when a user selects a product from the combo box the "Model" fields is displayed which is how I want it.

I am doing a query that should show the "Model field however when I run the query it shows the "ID" field which is useless information for the end user.

How do I show the correct field in the query?

View 7 Replies View Related

Combo Box To Select Correct Record On FORM

Dec 1, 2007

I have database of roughly 15000 records. The records have a unique number and the majority of searches etc work OK. The problem is with a form used to display record details with various sub forms embedded on the form.
Scrolling through displays the correct details.
Trying to use a combo box to determine the record selected does not work correctly.
The combo box is made up of 4 columns of "NAME", "COUNTRY", "ROLE" and "UNIQUE NUMBER"
Typing in the combo box auto fills in the NAME until the correct one is found. If the name is unique it opens on the form correctly. But if the name is not unique it does not always open the correct record.
Is there any way of being able to use the NAME to search through the combo box entries but use their unique number to determine the record selected.
A further problem arises as there are apostrophes in the NAME as well

View 3 Replies View Related

Subform Correct Answer Adds To Number Correct In Main Form

Mar 2, 2012

The code I have is.

Code:
Private Sub Command26_Click()
If Forms![test site]![prp test].Form.[A Right Answer] = -1 Then
Forms![test site]![number correct] = Forms![test site]![number correct] + 1
End If
DoCmd.FindNext
End Sub

Then when clicked it checks a yes/no box to see if "A right Answer" is the correct yes. Then it should pop to the main form and take the number correct cell and add one to it. I am trying to get the record to go to the next record inside the sub-form but docmd.findnext seems to be wrong too.

View 4 Replies View Related

General :: Access 2010 / Combo Box Not Displaying The Correct Item?

Apr 28, 2013

Using ms access 2010, I created a table called all items contains the ID, item name, item code, item price.

Second table I created called orders, contains item1,Q1=quantity,Tot1=calculated field.

Then a form to fill the orders table with a combo box for Q1 (gets the value from a table called numbers), second combo box for item1 (gets the value item code and item price from the table all items), and a text box to calculate the total of the Q1-item1(item price) All working perfect except the combo box for item1 ends up displaying a different item code that's only if the items were at the same price, for example, I choose latte from the combo box gives me correct item price but the code is cappuccino, only happening with items with the same price.

If I set the property of the combo box Bound Column to 1, I get correct item code but calculation error, Bound Column to 2, I get correct calculations but wrong item code. how to get the combo box to display the correct item code?

View 1 Replies View Related

Customize The Sort Order Of A Combo Box

Dec 7, 2005

i have a combo box on a payment form which shows existing permit #s. i'd like to make the sort order show the most recently added permit first. i clicked on the build button next to RowSource on the data tab of the properties of the combo box which opens the query my combo box is based on. there are only 3 sort order options...ascending, descending, & not sorted. can this be done?

the permits form has a button to open the payments form (payments can also be opened alone too - ie. if somone applies for a permit today but pays for it tomorrow...). usually this will not be the case but that is why i have to keep it either combo or list.

all help is appreciated.:)

View 3 Replies View Related

Combo-box Order And Form Backgrounds???

Nov 29, 2006

I have just created a combo box to list and select all of the records in my database so they can be selected quickly, however for some reason the list is not in the correct order.

I have been back to the table and sorted all of the records into ascending order based on the field that is being used in the combo drop down box, but it is still not correct.

There must be an easy way to put them in order. Do i need to change the primary key so that it corresponds the field i am using to search or is it more comlicated than this??

Also, I created a form using the form creation wizard and now i have a grey stone background that i would like to get rid of. How do i do this? There only seem to be 9 or 10 pre-made formats to choose from?

Thanks in advance

View 2 Replies View Related

Combo Box - Custom Sort Order

May 22, 2014

I have a combo box with the following entries:

Document
Other
Process
Validate
Verify

I want the list sorted so that "Other" is at the bottom. Everything else is alphabetical ascending. Is this possible?

View 4 Replies View Related

Two Combo Selection Boxes: Sort Order Problem

Jun 22, 2005

I have a form that house two record selection combo boxes, one for Customer Name and one for the Tracking number.

Both work as intended and return the correct record.

The problem is with the sort- I used a query for the source. That query will allow either the tracking number to be the sorted order OR the Customer name to be the sorted order.

I need code to make the sort order in the combo boxes on the fly, depending on which combo box the user selects.

Will you tell me how you would handle this?

Thanks, in advance-

View 2 Replies View Related

Forms :: Filling Multiple Text Boxes In Order By Choosing From Combo Box

Dec 1, 2014

I have a form for user to select multiple items from a combo box, and 18 unbound text boxes , each time user selects an item in combo and hits "add" the value appears in txt box by order, I mean select1 then "add" filling txtbox1, select2 then "add" filling txtbox2 ... and so on till we reach txtbox18, then msg box appears that he filled the whole 18 boxe. I have already done this before for one txtbox which is a very simple operation, but i cannot figure out how to do it with multiple txtboxes.

View 2 Replies View Related

Forms :: Possible To Have Combo Box On Form With Fields Joined With Alphabetical Order On Surname

Aug 1, 2015

I have a Table with 6 fields, 2 are named Initial and Surname. Is it at all possible to have a combo box on a form with these to fields "joined" with the alphabetical order on the Surname. I understand that using a query will not work as the result is based on an expression

View 11 Replies View Related

Forms :: Create A Data Entry Form To Order Table Using 2 Cascading Combo Boxes

Jan 31, 2014

What I am trying to do is create a data entry form to an "order table" using 2 cascading combo boxes. I have created a data entry form based on a query. I can't get the cascading combo boxes to work properly.Here is the code:

Private Sub Combo0_AfterUpdate()
Combo2.RowSource = "SELECT L2_ID,L4_Element_name,L5_Category FROM qry_ord WHERE L3_ID = Combo0.Value;"
Combo2.DefaultValue = [Combo2].[ItemData](0)
Command4.SetFocus
End Sub

[code]....

View 2 Replies View Related

How To Display "row Source" In Combo Box In Alphabetical Order

Mar 29, 2006

Hi all,

I am using a combo box in my form and its row source is set to Table A, however, the data in the combo box arent displayed in alphabetical order even though the data from Table A is sorted in ascending order.

can pls help me by teaching me How to display "row source" in combo box in alphabetical order??

thks alot

FT:)

View 3 Replies View Related

Allow More Than Order In ORDER Form

Apr 4, 2013

I have a problem when I want to create an "ORDER" form, that will allow user to enter more than one order.

I have no clue how to do it.

View 14 Replies View Related

Not Sure I Have My Relationships Correct...

Nov 10, 2005

Hi everyone,

I am trying to build a little shopping cart. I think my major problem is the relationships. I can't seem to get them right.

My major problem is adding items to the shoping cart (basket).
I guess 1 item can go in many baskets and a basket can hold many items. Make sense?
so i have my tblItem & tblBasket, and then I made another table called tblConnectBasketItem, which holds the itemid & basketid.

In any rate, this is where I got confused.

If someone can look over my DB, and give me some pointers, that would be great and thankfull.

You can find my DB attached.

Thanks again,
Sass

View 2 Replies View Related

Many-to-many Structure Correct?

Jun 11, 2005

I’m struggling to fix a database for my state agency. Here’s what the social workers need:

The agency holds several Foster Parent training sessions a year. Each session consists of 9 classes. We need to track ‘student’ attendance at each class. We also need to track class dates for each student.

The fly-in-the-ointment: ‘Student’ foster parents must attend the 9 classes, but they can fulfill this requirement over several sessions. They can take classes 1, 2 and 5 in Session 1, classes 3, 4, 7 in Session 2, and so on.

Here’s what I’ve created:

tblSessions
SessionID
SessionLocationkey ( to tblLocations; irrelevant to this post)
SessionStartDate
SessionName

tblClasses
ClassID
SessionIDkey
ClassTopic
ClassDate

tblAttendance
ClassID
StudentID

tblStudents
StudentID
StudentFirstname
etc.

The Attendance table is the junction table for the many-to-many relationship between Students and Classes.

Is this the correct structure? Thanks in advance for any advice. And thanks to Pat Hartman, The Doc Man, and SJ McAbney for getting me this far with the advice I found in researching this topic.

Sean

View 12 Replies View Related

Is The Design Correct For What I Want?

Apr 26, 2006

tblFAR
FarNumID (PK)
FarNumber
FarTitle

tblFarParagraph
FarParaID (PK)
FarNumID (fk from tblFAR)
FarParaTitle
FarParaText

tblAC
ACNumID (PK)
ACNumber
ACTitle

tblACParagraph
ACParaID (PK)
ACNumID (fk from tblAC)
ACParaTitle
ACParaText


1.Each FAR contains Many FarParagraph 1 to Many
2.Each AC contains Many ACParagraph 1 to Many
3.Each FarRParagraph contains Many ACParagraph
AND
Each ACParagraph contains Many FarParagraph Many to Many

What I’m trying to do:

FAR
Chapter 1
Paragraph a – Relates to AC Chapter 4 paragraph a1
Paragraph b – Relates to AC Chapter 4 paragraph a
Paragraph c – Relates to AC chapter 6 paragraph b

AC
Chapter 4
Paragraph a – Relates to FAR Chapter 1 paragraph b
Paragraph a1 – Relates to FAR Chapter 1 paragraph a
Paragraph a2 – Relates to FAR Chapter 6 paragraph c
Paragraph b – Relates to FAR Chapter 8 paragraph d

I’m not sure if my design is correct for what I want.
BTW -- AN "AC" and "FAR" are just a type of document.
Thanks
Paul

View 1 Replies View Related

Please Correct This Statement

Mar 31, 2005

Dear All

It may be a very dump question but I can't get my head around it.

I have a MainForm and then a subform Form1 on it.

There is a command button cmd1 on subform Form1. Now I want to access cmd1 through another command button cmd2 on a different form Form2. How would I design the statement?

I have tried the followings on OnClick event of cmd2 on Form2

Forms!MainForm.Form1.cmd1.visible = true

Forms!MainForm.cmd1.visible=true

Forms!Form1.cmd1.visible=true

Forms!MainForm.Subform.Form1.cmd1.visible=true

Nothing works. Any suggestions?

Thank you

:confused: :confused:

View 3 Replies View Related

Getting Correct Output

Jun 29, 2005

Hi guys,

Attached is a real simple database. What I want to be able to do is insert new payment details, and I have a couple of issues.

I have two clients and need to be able to select which client I want, select the payment details from the drop down list and enter in some appropriate amount.

Its been a while since I've created a db from scratch so this is obviously where I am having my difficulties. However I think I need to use a sub form.

How can I input the details as above, and how can I always get the combobox to default to the first entry in the list rather than defaulting to zero?

Thanks for the pointers.

View 3 Replies View Related

Correct Syntax

Oct 11, 2004

End result query example:

Between #10/15/04" And #10/15/04# - 6
Or the date range of 10/10/04 through 10/15/04

This would be in a query under the Date field

What is the correct syntax? Please include
() and # signs where they need to be.

Thank you.

View 1 Replies View Related

General :: Zero Value Is Not Correct?

Sep 2, 2014

I have a form that should give me all values below " 0" but I am getting zero

but when I click on that value I see this

-1.52587890625E-05

View 3 Replies View Related

Selecting The Correct Table

Mar 10, 2006

I have an order table and depending on the the product grp it needs to then be able to select the appropriate size scale table.

e.g.

I order suits, and select a size grade A ( there are 7 size grades ) I then then to enter the size scale for that product. I am not sure whether to create 7 differant tables with the different size grades and link that to the table, if so how do i get it select the correct table.

please help...

H

View 1 Replies View Related

Selecting The Correct Table

Mar 10, 2006

Selecting the correct table

--------------------------------------------------------------------------------

I have an order table and depending on the the product grp it needs to then be able to select the appropriate size scale table.

e.g.

I order suits, and select a size grade A ( there are 7 size grades ) I then then to enter the size scale for that product. I am not sure whether to create 7 differant tables with the different size grades and link that to the table, if so how do i get it select the correct table.

please help...

H

View 2 Replies View Related

Correct Relationship Setup?

Jun 14, 2006

Hi all..

I have a simple database setup...

When I do a test query on the tblMain.. all I get are numbers.. How do I change the numbers to text?

Thanks again
R~

View 2 Replies View Related







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