Multi-color In List/subform/...

Jul 10, 2006

Hi all.

I have searched everywhere but I cannot find the anwser. I'll try to explane.

I have a table in ma database, to make it easier, let's call it Table1.

Table1:
Id,Name,Category

Now, In my form, I wanna see this table. I did it with a list, and that works perfect. Now, I want the next thing to happen:
If category = 1, then the backcolor of that record should be yellow
If category = 2, then the backcolor of that record should be green.

Now the problem is, how can I get multicoloring in my list? or in a subform?

Thx

View Replies


ADVERTISEMENT

Forms :: Multi-Select List Boxes To Filter Subform

Oct 6, 2014

I have 7 multi-select list boxes, which I want the user to be able to select multiple items and have it filter a subform by what is selected. The subform will not be visible.

Here is the code I tried for filtering my subform (which is throwing an error when I call it).

Private Function MasterSearch()
On Error GoTo Error_MasterSearch

Dim StrgSQL As String
Dim WhereClause As String
StrgSQL = "SELECT * FROM MasterTbl"

[Code] ...

The above code was to test just 1 of the 7 listboxes. When I call it on click for the command button, it throws an error about the "Call MasterSearch".

View 1 Replies View Related

Use Multi-select List Box To Filter A Report With Two List Boxes

Nov 20, 2013

Allen Browne's "Use a multi-select list box to filter a report" solution, in particularly with two multi-select list boxes? The code works fine for me for either box so long as I code it for one box alone. Combining the two into one code results in a type mismatch error. I'm trying to use the code to pass the contents of both multi-select boxes as Where conditions to a report. Both boxes are based on number fields. To try to isolate the problem, I've removed Allen's setDescription and OpenArgs conditions. We're unfortunately still on Access 2003 as the company desires to squeeze every dime by using until end-of-life next year.

Code:
Private Sub cmdPreview_Click()
On Error GoTo Err_Handler
'Purpose: Open the report filtered to the items selected in the list box.
Dim varItem As Variant 'Selected items

[Code] .....

View 14 Replies View Related

List Box Color

Sep 23, 2005

My list box on my form has the fore color set to 255 or red yet it still displays the first column in black and the rest in red. Am I missing something? Why isn't it all red?

Wulf

View 5 Replies View Related

Color In The List Box

Dec 15, 2006

Hi,

I have a question.

Can we do the color inside the List box?

Suppose we 10 rows data inside the List box, I want to put color every other lines.

Can we do that?

Thanks.

View 2 Replies View Related

Change Font Color Of Selected List Box Item

Jun 3, 2013

My list box will be used to populate a form, is it possible that once the item is dble-clicked, it reverts to a different color to let the user know it has already been selected once or can the row be locked once it has been selected?

View 2 Replies View Related

SubForm Color

Sep 3, 2004

Is there a way to change the background color of just one column in a subform?

Thanks in Advance - John

View 1 Replies View Related

Multi-column List Box

Apr 19, 2006

Hi there,

I'm sure I'm not being dim, but I really can't figure how to do this.

I have a list box with two columns. One column (bound) is a name, the other is a unique ID. I need to transfer both the Name and the ID to a second list box (again, two columns).

I can get it to do this with single selections, but not multiple ones, and this is what I need.

Any ideas?

Cheers

View 1 Replies View Related

Multi List Box Filter

Jun 7, 2007

I appreciate your help in advance. I am new to most of this and I need a little assistance. I have searched the web and found some articles etc... I am just not sure how to apply it to mine because I am unfamiliar with some of the wording etc.. I understand a very little of what people are saying but I can't quite put it all together.

I have a form called "reportfilterfrm" in this form I have 3 list box's. On 2 of the list box's multi select is selected to "None" and I have them bound to the criteria field in my query and that works perfect. The 3rd list box multi select is set to "Simple" and I am not sure how to get the query to refrence this.

The query is called "reportfilterqry"

listbox #3 is called [opponent] I would like it to be the criteria for [opponent] in the "reportfilterqry" It is a text field.

Thanks again for your help. I really appreciate it!

View 8 Replies View Related

Multi-Select List Box

Jun 10, 2005

Hi,
This is my first posting on this forum, and I would greatly appreciate any help with this issue...

I have a form that is used for entering information into tables. I would like to be able to select multiple options from a list on a form and have it saved into a table. Any ideas? Is this even possible :confused:

Here are some paths I followed:
The table has a List Box field, type Text, that gets values for the list items from another table. On the form, I have changed the Multi-Select property of the List Box to "Extended" so that the user can select multiple items from the list. But when I select items from the List Box, the table is not getting updated with the selected items.

Another way I tried doing this: The table has a List Box field that has no values (I'm not looking up values from another table). On the form, I set the Row Source of the List Box equal to the query that gets the list values from a table. I then set the Multi-Select property to "Extended". When I select multiple items from the List Box, the table doesn't get updated.

FYI: The control source for the list box on the form is pointing to the field in the table.


Thanks,
dbnewbie

View 4 Replies View Related

List Box Multi Search

Jan 21, 2006

See attached Database


I'm trying to create a list box as you can see in the list box section
is conected to the patients query

What i'm trying to do is is link the text box to the list box but dont know how to do it.

Also user can search by Account#,Last Name, First Name and Social security # all in one field any ideas.

View 2 Replies View Related

Multi-Select List Box

Jun 6, 2006

Good morning all...

I have two questions regarding a multi-select list box.

First, is there any way to have the list box include multi-line items...or which will scroll beyond the right border of the box?

Second, I have a multi-select list box which is populated with an ID # column and a Description column. The user can select as many items from the list box as needed and, as the list box item is clicked, the ID # is added to a memo field on the form, with each ID # delineated with a coma. Is it possible to separate the memo field back out so that each item is identified individually (for report purposes)?

Thanx so much for your help with this...you guys/gals are simply the best!

Karen

View 1 Replies View Related

Multi-column List Box

Oct 1, 2004

I have a list box derived from a two column SQL select. When I try to use the user selected element I only get the first column data value.

In debugging I have tried ...

Ret = MsgBox(Me.List6.Value, vbOKCancel)

and...

Ret = MsgBox([Forms]![MeetingStatus]![List6], vbOKCancel)

Both of which return the selected row, first column value only.

I can find no help on how to return the content of the second column or the selection as a whole.

View 1 Replies View Related

Multi List Select Problem

Sep 29, 2005

I have a dialog box where the users can filter a report by various combo boxes that works well. I'm trying to add a multiselect lis box option for one of the combo boxes and have added code which I've also used before. Together the code is looping through and opening the report without a problem, except it's not filtering by the options selected in the list box. Here's what I've got:

If Left(Me![cboSupplier].Column(0), 1) = "*" Or Right(Me![cboSupplier].Column(0), 1) = "*" Then
where = where & " AND [qssupp] Like " + Me![QSSupp].Column(0)
Else
where = where & " AND [qssupp]=" + Me![cboSupplier].Column(0)
End If

If Left(Me![cboPartNo].Column(0), 1) = "*" Or Right(Me![cboPartNo].Column(0), 1) = "*" Then
where = where & " AND [partID] Like " + Me![PartID].Column(0)
Else
where = where & " AND [PartID]=" + Me![cboPartNo].Column(0)
End If

For Each varItem In cboStatus.ItemsSelected
If strCondition = "" Then
strCondition = "[odstatusid] = " & cboStatus.Column(0, varItem)
Else
strCondition = strCondition & " OR [odstatusid] = " & cboStatus.Column(0, varItem)
End If
Next varItem

Set QD = db.CreateQueryDef("Dynamic_Query", _
"Select * from qryWeeklyOrderStatusRpt " & (" where " + Mid(where, 6) & ";"))
If (DCount("*", "Dynamic_Query") = 0) Then
MsgBox "There are no records to print"
Exit Sub
End If

Can anybody see where I'm going wrong?

View 4 Replies View Related

Multi Pick List Within A Table

Mar 6, 2006

I have a master table with several pick list columns. One field in particuliar has 3 options(fed from a separate table):
a
b
c
But, the user will have a need to select more than just 'a' for example. they will need to select 'a' and 'b', or 'b' and 'c'....etc

Can this be done in a table within Access?

Thank You,
RRA23

View 1 Replies View Related

Multi Select List Box Formatting

Jan 30, 2006

I am using a Multi Select List Box to display a list of names from a table, in order to select e-mail recipients. The names are in two fields: [Main]![First Name] and [Main]![Surname].

I have done this by using the following code for the rowsource:

SELECT DISTINCTROW Main![e-mail], Main![First Name], Main!Surname FROM Main;

This gives a rather undesired effect, in that shorter first names have a large gap before the surname. In addition, there is a dull separating line between the two columns, thus:

Jane | Smith
Bartholomew | Simpson

My questions:

Is it possible to arrange the names so they appear in one column, with a space between them? (i.e. they would appear as written)
If not, can I get rid of the separating line?

Many thanks in advance if you can help!

View 4 Replies View Related

Forms :: How To Get Multi Value From List Box To Be Used In A Query

Apr 25, 2014

i need to know how to get the multi value from list box in my form to be used in a query the list box worked great when it was not multi value

View 3 Replies View Related

General :: Multi Select List Box

Dec 22, 2014

I use access to gather information on testing that is conducted at my company. In the database I designed I set up a multiselect list box for when the people who conducted the test can check off the test equipment that they used. I did this because at anytime any number of different items can be used. Though I don't think we have ever used more then 10 test items. The reason for tracking the items that were used is if they, when out for yearly calibration, come back out of spec we can look at what tests used that equipment. As I further develop my system, I am starting to ask for more information from the requesters. I would like them to be able to check off what individual items are in the item being tested. Creating that list isn't the hard part for me.

My question comes in here. I know that using a multiselect list box is frowned upon as they can be sloppy to deal with when looking to extract data. Being as I am looking to expand my database, I was looking for what to do. I would still like to give the option of a multiselect list box, but should I create more fields and have the items used put into these new fields? Should I do the same for equipment that is used for the testing. If not and the list box is ok, how best to go through all the records to gather what ones used the specified equipment?

View 2 Replies View Related

Modules & VBA :: Color Row In Subform If Value Filled In

Mar 19, 2015

I created a subform in side a form where I have some data. The idea is to fill in the row with a color if a value is met, like "Reset".Conditional format is working (for one field), but in Access 2003 I can only have 3, and I have like 6 values to choose from.I use the below code to no avail:

Code:

Option Compare Database
Private Sub Form_AfterUpdate()
If Me.Legend = "Reset" Then
Me.Legend.BackColor = vbRed
End If
End Sub

View 1 Replies View Related

Using Multi Select List Boxes To Run Queries

Apr 21, 2006

I have a simple question that I know will have a very complex answer


You have two sets of tables with identical structures. The first set contains data that is a model for the second set. The users run queries that append data to the second set of tables

Here is an example of the structure
TblSourceOne
SourceOneID
SourceOneData

TblSouceTwo
SourceTwoID
SourceOneID
SourceTwoData

TblSouceDetails
SourceDetailsID
SourceTwoID
SourceDetailsData

As you can see TblSourceTwo contains a foreign key from TblSorceOne and TblSorceDetails contains one from TblSourceTwo

The main table for the second set

TblTargetOne
TargetOneID
SourceOneID
TargetOneData

The user adds a record to the main table (TblTargetOne) then uses an append query to add all of the applicable records from TblSourceTwo to TbleTargetTwo

TblTargetTwo
TargetTwoID
TargetOneID
TargetTwoData

So now the user has a data model in TblSourceTwo which has been “copied” to TblTargetTwo

Next for each record in TblSourceTwo that has been copied to TblTargetTwo that has daughter records in TblSourceDetails another query is executed to copy all of the pertinate records to the TblTargetDetails

TblTargetDetails
TargetDetailsID
TargetTwoID
TargetDetailsData

Now the user has completely copied all of the necessary record for both table.

Finely the question

How can I use a multiselect list box to achieve this in one operation? I don’t care if it includes running multiple queries but it needs to appear as one single operation to the user.

View 2 Replies View Related

Forms :: Multi Select List Box In A Form

Mar 6, 2013

I have a form which contains a multi select list box of team leaders. Unbound getting source from tl table. Based on one or more selection from user I want to run query that brings up those team leaders. When I have multi select to none in list box and select one to the query works fine. When I change it to simple or expanded it shows nothing. I have query criteria to get data from form list box.

View 1 Replies View Related

Queries :: Using Multi List Box And A Combo Box In Query

Jan 23, 2014

I currently have a database of customer information and form set up with a MultiList box based on the regions those companies are based. You select the region(s) you require from the list box, click a button and it runs a query.

However I now want to be able to filter the results further using a combo box with business sectors in also.

The code used for the multilist box is as follows (I don't totally understand all the code if I'm honest, but it works )

Private Sub Command2_Click()
Const cstrQuery As String = "CAMPQRY"
Dim strNames As String
Dim strSelect As String
Dim StrWhere As String
Dim varItm As Variant

[Code] ....

View 2 Replies View Related

Forms :: Multi-selection List Box In A Form

Jun 21, 2013

I've created a database to track training courses. I'm having issues with selecting multiple trainers. I set up my table to lookup a "List" on the trainer column. I've entered 2 records into my form and it displays 6 records. See attach image.

View 3 Replies View Related

Open Report From Multi-select List Box

Jul 22, 2015

I am running MS Access 2010 on Windows XP and my access skills are limited.

So I have a db with tables, forms and reports and would like to give my users the option of opening a filtered report (from a form).

The form (frmSelectStatus) and report (rptStatus) have been created and both open correctly by normal selection from the 'All Access Objects' side bar.

frmSelectStatus has a multi-select list box (lstStatus) and a command button (cmdStatus). When I click cmdStatus i get the correct report opening but it is all status records and not filtered by the selection made in lstStatus - and i know this is a result of not referencing 'lstStatus' in the code. i also have a query (qryStatus) which does not contain anything.

My 'on-click' code for cmdStatus is

Private Sub cmdSelect_Click()
DoCmd.OpenQuery "qryStatus", acViewNormal, acEdit
DoCmd.OpenReport "rptStatus", acViewReport
DoCmd.Close acQuery, "qryStatus"
End Sub

I know I need to reference 'lstStatus' but am not sure where or how to do that in the code.

View 1 Replies View Related

Filter Using Multiple / Multi-Column List Box

Sep 17, 2012

I'm not familiar with listbox yet and i want to filter my form using it.

I have two separate listboxes which display "category" & "type" data from the same table.

Here is the situation i wanted for my listbox.

1. Select one data from "category" listbox.
2. Then it will automatically filter data from "type" listbox or it will list all related "type" data corresponding to "category" data.
3. Then select one data from "type" listbox and it will filter all related data on the form/sub-form.

Is it possible to do that way? Can i do it on multicolumn listbox instead of using 2 listbox?

View 1 Replies View Related

Updating A Table From A Multi-select List Box

Mar 26, 2012

I am trying to make a simple database where the data entered in a form will update to a table. My issue is, one of the fields is manufacturing location where I would like the user to be able to enter multiple locations and then have those locations update the table where the record is stored. I've been able to set up a list box with multi-select but am stuck at getting the table to update with the choices made from the list box selection.

View 2 Replies View Related







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