Forms :: Sorting Combobox Displayed Value

Jan 19, 2015

I have a combobox which lets you select from a list of pseudonyms. Each pseud belongs to an author; authors can have multiple pseudonyms and exactly one main pseudonym. This is the table structure (picture of relationships attached below):

Code:
tblStory: StoryID (PK), AuthorID (FK), Title, etc.
tblAuthor: AuthorID (composite PK, autonumber), MainPseudID (composite PK)
tblPseud: PseudID (PK, autonumber), Pseud, AuthorID (FK)

The combobox list shows all the pseudonyms and then stores the corresponding AuthorID. At the moment, the pseudonym displayed in the combobox (once a selection has been made) is simply the first alphabetically for that particular author: for instance, if a story has AuthorID = 5, and Author 5 goes by anon, anonymous, and unknown, the combobox for that story will display "anon".

How can I make the main pseudonym (tblAuthor.MainPseudID = tblPseud.PseudID) be displayed instead?

Control source is tblStory.AuthorID

Row source:

Code:
SELECT tblPseud.AuthorID, tblPseud.Pseud, tblAuthor.MainPseudID
FROM (tblAuthor LEFT JOIN tblPseud ON tblAuthor.AuthorID = tblPseud.AuthorID)
LEFT JOIN tblStory ON tblAuthor.AuthorID = tblStory.AuthorID
ORDER BY tblPseud.Pseud;

View Replies


ADVERTISEMENT

Forms :: How To Ensure That Textbox Value Displayed Is Based On Combobox Selection

Nov 4, 2014

I am designing a Web Database with a bound form to a submit table.

On the form, I have a combo box with selections that should influence the value to be displayed in a textbox also on same form.

For instance the combo box for Staff Name contains list of all Staff and I want the textbox to automatically display the level of the staff that was just selected in the combobox.

I know how to get this done using a combobox but my boss insists that the level should be automatically displayed in the textbox once combobox selection is done.

Using the combobox for level, I used the select statement in the RowSource property :

SELECT Staff_List.Level, Staff_List.Staff_Name FROM Staff_List WHERE (((Staff_List.Staff_Name)=[forms]![frmtest]![cboStaffName]));

I am in a dilemma of how to replicate this for the textbox because textbox only has control source and no RowSource where I can put this select statement.

Also, I will still need to bind this textbox to the submit table with the column name "TxtLevel" in the control source

Please see attached sample access db.

Also note that I cannot use action queries or VBA because it is a Web database and not a client database.

View 1 Replies View Related

Forms :: Unbound Combobox - Sorting List Of Files

May 19, 2014

I have a BackUp and Restrore from BackUp procedure in my my database.

I can backup to a spreadsheet and the spreadsheets are renamed to include the date of the backup.

When I restore from the backup an unbound combo is populated

Code : Set SourceFolder = FSO.GetFolder("c:GPandDetectionDogTrainingLogBackUp")

This all works, the only issue being, is that I want the most recent backup to be at the top of the list, at the the moment its at the bottom.

is there a way of implementing a sort order, bearing in mind that its an unbound combobox.

View 5 Replies View Related

The Selected Value Displayed In A Combobox

Apr 29, 2005

I'm sure this is simple and I'm just missing something...

I have a combo with two columns and the row source set up as a query which returns two columns.

When I click the drop-down arrow for the combo box, I get exactly what I expect.

What I want to do is initialize the combo box so that the "default" selection is displayed in the "text" or "value" section of the box. I also want to be able to update this when the user makes a selection.

I have no problems when using a list box with something like:
listbox.value = <Some Index in the listbox>

With the combo box, I've tried:
combobox.text = xxx
combobox.value = xxx
combobox.column = xxx
combobox.itemdata = xxx
combobox.listindex = xxx

The value property sort of works -- It displays the data from the first column right justified in the "text" section of the combo box. I need to have both columns displayed the way they are when the combobox is dropped down.

Any thoughts?

Thanks in advance...

View 3 Replies View Related

Sorting A Resulting Table Of ComboBox

May 2, 2007

hello,

I have a combo box that looks at a table with an SQL statement. In the form, the combo box shows the headers of the resulting table. Is there any way that the user can click on any header (let's say 'LastName' or 'Date' ) so the drop down list would be sorted by that header that the user clicks on??

Thank you very much

View 1 Replies View Related

Forms :: Update Row-source Of Combobox Based On Value Selected On Another ComboBox?

Apr 26, 2015

I am trying to use a combobox called Manufacturer to select which table the combobox called Model gets it's rowsource from using the code below.

Code:

Private Sub Manufacturer_AfterUpdate()
If (Me.Manufacturer.Value = "Siemens") Then
Me.Model.RowSourceType = "Table/Query"
Me.Model.Recordset = "SeimensTable"
Me.Model.RowSource = "SELECT Model FROM SeimensTable"
Else
If (Me.Manufacturer.Value = "Samsung") Then
Me.Model.RowSourceType = "Table/Query"
Me.Model.Recordset = "SamsungTable"
Me.Model.RowSource = "SELECT Model FROM SamsungTable"
End If
End If
End Sub

But when I run the form and select Manufacturer. Combobox Model remains empty. tell me what I'm doing wrong?

View 5 Replies View Related

Forms :: How Form Is Displayed

Jul 31, 2013

i want to make it equal to my forms adjusted width but i don't know how to do that. Also i thought it would look like a form enwrapped within a rectangle or a square yet its gluded onto Access with no border

View 2 Replies View Related

Forms :: Incorrect Name Of Form Displayed

May 6, 2014

I saved my form with a particular name and I have used that name all throughout my code and it still works fine. But when I open that form, the name I see on the top of the form is not that name at all. It's actually some value I gave a combo box a while ago.

View 2 Replies View Related

Forms :: Dates Found To Be Displayed In A List Box

Sep 30, 2013

I'm new to Access VBA and I am having a bit of trouble. I want to find the dates between 2 dates(both inputted into textboxes), when I press a button I want them dates found to be displayed in a listbox.

View 5 Replies View Related

Forms :: Database User Name Displayed On Welcome Form

May 15, 2013

I have an Assess 2007 database with a user table. This table holds database user names and user passwords an entry permission to the database. I also have a welcome form that activates when user enters the database using either of the user names and user password in the user table. Now, I would like to display the database user name (NOT THE SYSTEM USER NAME] on the welcome form of the user that enters the database.

View 14 Replies View Related

Forms :: Label And Field Being Displayed On Another Form

Jun 6, 2013

I've added a label and field to a page on an existing form. However these are now also displayed on other pages on the same form.

View 1 Replies View Related

Forms :: Pivot Chart Decimal Displayed

Jul 17, 2013

I have a pivot chart that has site locations, and hours on the bottom, and then count of records with each site. Which is how many people used this site during this time for each bar. My problem is when I generate my pivot chart, every single time I have to fix the scale on the right hand side because it has decimal points in it. They only appear when I add dates/times to it.I want to give this to my boss that has access runtime, so all he has to do is click the button to get the chart and then print or send it off. How do I get rid of those decimal points when the report is generated?

View 1 Replies View Related

Forms :: Combo Box Selecting Beyond Displayed List

Sep 11, 2013

I have a working combo box on a form that displays issue numbers for part number typed into a text box.This all works fine when the list of issue numbers is below the displayed list (16), but when the list is longer than 16 you cannot seem to select anything after item 16.

When the combo box has, say 25 items a scroll bar appears allowing the user to scroll down to item 25, but when you click the mouse the list just reverts back to the first 16 items? The only way to select an item after 16 is to select item 16 which then closes the combo box, then when you reopen it the list now shows items 17 to 25 which you can then select item 25.

This is the same in reverse, when you have item 25 selected, you cannot select item 1. When you click the mouse the list reverts back to items 17 - 25.The combo box is populated in code using the lost focus event on the text box for the part number.

View 7 Replies View Related

Forms :: Export Data Displayed To Excel Spreadsheet

Mar 2, 2014

I have a filter on a form using a combobox.I want to export the data displayed to an Excel Spreadsheet. I have used the Exportwithformatting Macro but it seems to export everything.

View 14 Replies View Related

Forms :: How To Distinguish Text Displayed In Unbound List Box

Jul 24, 2015

i have a form contains unbound listbox , that accumulates values of a field in that form "SalName" , when i move between records of this form i want the value that is in the current record is distinguished in the Listbox ( only where the SalID=SalID).distinguish by A special colour ,Font,undeline.

View 12 Replies View Related

Forms :: Specific Range In Excel To Be Displayed In A Form

Jul 10, 2013

I have a spreadsheet that my company uses that has about 20 clients presented in a single sheet in Excel so I was wondering if it was possible to display only a selected range (i.e. only one client) in a specific form in Access to cleanse this up a bit.

View 2 Replies View Related

Forms :: Total Line From A Query Displayed In A Form

Jan 8, 2014

I am looking for displaying the totals from a query onto a form.

I have a query which has a total line showing a count of the number of entry's in each column. I would like to be able to display these totals on one of my forms in text boxes (or any other way). Is this possible and if so how do I do it ?

View 3 Replies View Related

Forms :: How To Reorder Displayed Columns In Combo Box Dropdown List

Jan 10, 2015

I'm a newbie with Access, how to reorder the displaying of the columns in a Combo Box dropdown list of have in my Access 2007 application.

The columns that are being displayed are (in the current order):

Part Name
Unit Price
Parts.Web_Category

I want the order to be the following:

Parts.Web_Category
Part Name
Unit Price

View 13 Replies View Related

Forms :: Send Single Record Displayed On Form Not All Records

Apr 21, 2015

I've created a button on my ACCESS 2010 form that will send a PDF via email. However I only need to send the single record displayed on the form not all records.

The on click command of the button sends the PDF of the report. (I read that this is what should be sent; but still get the same results.)

I don't understand how and where to attach VBA code:

Me.Filter = "RequestsID=" & Forms![OD Reversal Requests]![RequestsID]
Me.FilterOn = True

View 5 Replies View Related

Forms :: Option Group To Select Subforms To Be Displayed - Popup Message

Aug 23, 2014

I have a form with an option group to select subforms to be displayed .To save space on the main form I have added a subform (frmSubService) to the option group to display some of the data that was originally on the main form. The subforms data source is the same as that of the main form but only displays five fields.

After editing data in the subform frmSubService, if I then click on a field on the main form no problem, however if I click on an option button to view another subform I get a messagebox pop up with the following message;

The data has been changed. Another user edited this record and saved the changes before you attempted to save your changes. Re-Edit the record.

If I click OK,and without re-editing the record, I can open another subform.

I have checked and the data changes made on frmSubService, in both cases, has been saved.

How do I prevent the pop-up message?

View 3 Replies View Related

Forms :: Using OnClick Event To Open Query Text Displayed In Form Field?

Oct 10, 2013

I have a table that holds the SQL texts for ca. 1000 Select queries (mostly minor variants that are used to programmatically swap out RowSource strings for combo boxes). I'd like to have a quick and easy way to open/review/modify these queries.

One strategy would be to display the SQL strings in a field on a Datasheet form, then use an onClick event on a text box linked to the SQL-holding field (or perhaps an onClick event tied to an unbound text box on the form) to open the associated query. That would allow me to view the SQL of the query that I want to open, allow me to quickly scroll through the list of stored SQL texts, and give me options for sorting or limiting the SQL-texts displayed in the datasheet form.

But, I can't seem to get the onClick event to work. The problem seems to be that I can't figure out how to pass the SQL string contained in the field to a function that will use that string to open the query .

View 10 Replies View Related

Forms :: Change Backcolor Of A Field On Current Record Displayed In Multiple Items Form

Apr 8, 2013

I wish to change the backcolor of a field on a current record being dispalyed in a 'multiple items' form. However when using me.A.backcolor = makes refrence to all fields called A on the 'multiple items' form and therefore all fields change colour not just the current record.

View 2 Replies View Related

Sorting A Table, Apply The Sorting To A Form

Mar 10, 2006

Hi all.
I've created a database which contains information about stores. I want to have the forms automaticly sorted by the department number.
I've tried to sort the table by department, but when I try to add a department, the sorting doesn't seem to affect the form at all.

Lets say I have department 1,2,3,6,7,8 in the form, and I add department 4, it will be the last post in the form. I want it to be the fourth, and so on..

I'd apreciate some help with this :) Thanks

Here's the database (http://www.access-programmers.co.uk/forums/attachment.php?attachmentid=12934&stc=1&d=1142018915&PHPSESSID=f730b7f11f6983965698faeacbe5a1ee)

View 5 Replies View Related

Forms Sorting

Jun 13, 2006

In Report I can sort any field by clicking with right click in Detail area of the Report.
How I can sort a field in Forms??

View 1 Replies View Related

Forms :: Sorting A Combo Box?

Apr 3, 2013

I have a combo box on my form where Row Source=Facilitators and Row Source Type=Table/Query. "Facilitators" refers to a one column table named Facilitators. This one column table contains a list of last names of a dozen or so staff members. The field name of this column I just left as Field1 (the default name). In table view I sorted the last names in ascending order.

When I open the combo box on the form itself, the list of names appear in random order instead of keeping the ascending sort order that I initially applied to the table.

I know there is a way for the combo box to keep the sort order in tact, but I can't recall what it is.

View 3 Replies View Related

Forms :: Sorting Combo Boxes?

Jul 25, 2014

I know I can sort my combo box in ascending or descending order. I have a list of items that I want to order by product code but in a specific way. The order I would like is product code 1 followed by product code 9 followed the rest in ascending order. Without having to change tables or even the product code(!) is there a neat way to do this?

View 10 Replies View Related







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