I don't seem to understand why you have Me.Products= Me.Products.
ItemData( 0) at the end of the SQL statement. Is this part of the
criteria?
In addition, if Categories is a text then you need to enclose it in
single quotes like "WHERE VendorID = '" & Me.Categories & "'".
Please note that after the equals sign there is a single quote (') and
then double quotes (") and after Categories there is the ampersand
(&), double quotes ("), single quote and then double quotes again.
tHE REASON IS IT'S AT THE END OF THE STATEMENT mE.PRODUCTS BECAUSE IT'S PART OF
THE CITERIA SO THE PRODUCTS COULD POPULATE WITH THE VENDORS CASCADING LIST BOX
Also Info path wouldn't help me to put the datatbase on the web it wouldn't
filter list boxes
I guess then Infopath it's html based.
I am attatching the sample website based on the database.
All I am trying to do is to change the catagory field to vendor, so it will
populate from the products table assocaited from the vendor.
it is on the microsoft website
How to Synchronize two list boxes on a form Access 2003
http://mail.live.com/default.aspx?wa=wsignin1.0
How to synchronize two combo boxes on a form in Access 2002 or in Access
2003View products that this article applies to.This article was previously
published under Q289670Moderate: Requires basic macro, coding, and
interoperability
skills.
This article applies to a Microsoft Access database (.mdb) and to a
Microsoft Access project (.adp).
For a Microsoft Access
2000 version of this article, see
209595
(http://support.microsoft.com/kb/209595/EN-US/
)
.
For a Microsoft Access 97 version of this article,
see
97624
(http://support.microsoft.com/kb/97624/
)
. On This PageSUMMARYMORE INFORMATIONNotes
.ExternalClass #EC_tocTitle, .ExternalClass #EC_tocDiv
{display:none;}
Expand all | Collapse allSUMMARYThis article describes how to synchronize two
combo boxes so that when you sele...
This article describes how to synchronize two combo boxes so
that when
you select an item in the first combo box, the selection
limits the choices in
the second combo box.
Note This article explains a technique that is demonstrated in the sample
file, FrmSmp00.mdb.
For additional information about how to obtain this
sample file, click the following article number to
view the article in the
Microsoft Knowledge Base: 233324
(http://support.microsoft..com/kb/233324/
)
ACC2000: Microsoft Access 2000 Sample Forms Database Available in Download
Center
Back to the topMORE INFORMATIONThe following example uses the sample database
Northwind.mdb. The first combo b... The following example uses the sample
database
Northwind.mdb. The first combo box lists the available
product categories, and
the second combo box lists the available products for the
category selected in
the first combo box:
Microsoft
provides programming examples for illustration only, without warranty
either expressed or implied. This includes, but is not limited to, the
implied warranties of merchantability or fitness for a particular
purpose. This article assumes that you are familiar with the
programming language that is being demonstrated and with the tools that
are used to create and to debug procedures. Microsoft support engineers
can help explain the functionality of a particular procedure, but they
will not modify these examples to provide added functionality or
construct procedures to meet your specific requirements. Open the sample
database Northwind.mdb.Create a new form that is not based on any table or query
with the following combo boxes, and then save
the form as Categories And
Products. Combo Box 1
-------------------------------
Name: Categories
RowSourceType: Table/Query
RowSource: Categories
ColumnCount: 2
ColumnWidths: 0";1"
BoundColumn: 1
AfterUpdate: [Event Procedure]
Combo Box 2
--------------------------
Name: Products
RowSourceType: Table/Query
ColumnWidths: 2"
Width: 2"
NOTE: If you are in an Access
project, the RowSourceType will be Table/View/StoredProc.Add the following code
to the AfterUpdate event procedure
of the Categories combo
box:Me.Products.RowSource = "SELECT ProductName FROM" & _
" Products WHERE CategoryID = " & Me.Categories & _
" ORDER BY ProductName"
Me.Products = Me.Products.ItemData(0)
View the Categories And Products form
in Form view. Note
that when you select a category in the first
combo box, the second combo box is
updated to list only the available products for
the selected
category.Back to the topNotes In this example,
the second combo box is filled with the results
of an SQL statement. This SQL statement finds all the
products that have a
CategoryID that matches the category that is selected in the
first combo
box.
Whenever a category is selected in the first combo box, the AfterUpdate
property runs the event procedure, which sets the second combo
box's RowSource property. This refreshes the list of
available products in the
second combo box. Without this procedure, the contents of the
second combo box
would not change.
--- On Tue, 4/7/09, Michael Van Der Stad <[email protected]> wrote:
From: Michael Van Der Stad <[email protected]>
Subject: Re: [ms_access] Sum formula not working in the Control Source
To: [email protected]
Cc: [email protected]
Date: Tuesday, April 7, 2009, 10:14 AM
can you please give m that example in the coding.
Me.Products. RowSource = "SELECT ProductName FROM" & _
" Products WHERE VendorID = " & Me.Vendor & _
" ORDER BY ProductName"
Me.Products = Me.Products. ItemData( 0)Can you please let me know if this is
correct
Also I have another database, for books that when I select the author, I want
the book to populate the list box only associated with the authors.
I hear that Infopath is alot easier on these things
Also in the form it's only dispaying 6 records not all 100
Even when I populate one list box to the subform I still have trouble
What is a cascading list box?
A cascading list box is a list box with choices that change based on the
value that a user selects in another list box. For example, if a user clicks
Condiments
in the Categories box shown in the following illustration, the Products
box will display a list of condiments.
The following sections show you how to design a form template with two list
boxes, where the second list box is filtered based on the value a user selects
from the first list box. When the value in the first list box changes, the
filter is automatically applied to the second list box, which changes its
values.
Compatibility considerations
Filters can be used only in form templates that are designed to be filled
out in InfoPath. Filters are not available in browser-compatible
form templates (browser- compatible
form template: A form template that is designed in InfoPath by using a specific
compatibility mode. A browser-compatible form template can be browser-enabled
when it is published to a server running InfoPath Forms Services.).
Top
of Page
Step 1: Insert a cascading list box
To create a cascading list box, you must insert two list boxes in your form
template.
Note When you insert a cascading list box in
your form template, ensure that the two list boxes are not in a repeating
section (repeating
section: A control on a form that contains other controls and that repeats as
needed. Users can insert multiple sections when filling out the form.)
or repeating table (repeating
table: A control on a form that contains other controls in a table format and
that repeats as needed. Users can insert multiple rows when filling out the
form.).
If the Controls task
pane is not visible, click More Controls on the Insert menu,
or press ALT+I, C.Under Insert controls
in the Controls task pane, click Drop-Down List Box. When a
user fills out a form that is based on your form template, the selection
in this drop-down list box will determine the choices that are available
in the second list box.Click List Box. Your
form template should now contain a drop-down list box and a standard list
box.
Double-click the drop-down
list box that you inserted in your form template in step 2.In the
Drop-Down List Box
Properties dialog box, click the Data tab.In the Field name box,
type listBox1, and then click OK.Double-click the list box
that you inserted in your form template in step 3. In the List Box
Properties
dialog box, click the Data tab.In the Field name box,
type listBox2Cascade, and then click OK.
http://office. microsoft. com/en-us/ infopath/ HA102352251033. aspx
--- On Mon, 4/6/09, L Tumbulu <l.tumb...@sdvmalawi .com> wrote:
From: L Tumbulu <l.tumb...@sdvmalawi .com>
Subject: Re: [ms_access] Sum formula not working in the Control Source
To: ms_acc...@yahoogrou ps.com
Date: Monday, April 6, 2009, 9:43 AM
I don't seem to understand why you have Me.Products= Me.Products. ItemData( 0)
at the end of the SQL statement. Is this part of the criteria?
In addition, if Categories is a text then you need to enclose it in single
quotes like "WHERE VendorID = '" & Me.Categories & "'". Please note that after
the equals sign there is a single quote (') and then double quotes (") and
after Categories there is the ampersand (&), double quotes ("), single quote
and then double quotes again.
HTH
Liveson
----- Original Message -----
From: Michael Van Der Stad
To: ms_acc...@yahoogrou ps.com
Sent: Sunday, 05 April, 2009 2:48 AM
Subject: Re: [ms_access] Sum formula not working in the Control Source
I am having some trouble to just to populate two list boxes vendors and
products I generate the code, the computer don't like it.
Me.Products. RowSource = "SELECT ProductName FROM"
"Products WHERE VendorID= " &
Me.Categories
_ "ORDER BY ProductName" Me.Products = Me.Products. ItemData (0)
can u please help me
thanks
Mikevds
--- On Fri, 4/3/09, L Tumbulu <l.tumb...@sdvmalaw i .com> wrote:
From: L Tumbulu <l.tumb...@sdvmalaw i .com>
Subject: Re: [ms_access] Sum formula not working in the Control Source
To: ms_acc...@yahoogrou ps.com
Date: Friday, April 3, 2009, 3:29 PM
Dawn
You seem to be getting quite weird problems with your database. If the formula
is in the control footer or the report footer and the control source is valid
the formula should work i.e. If Num_Unit_Facility_ 01 is a valid control source
(check the underlying table) and the formula is placed in the
Num_Unit_Facility_ 01 footer you should get the correct answer unless there is
something wrong with your Access.
Looking at your question again you say that you have created the formula in the
Control Source of your Sum_Num_Unit_ Facility_ 01 field. This is not clear at
least to me. You place the formula in the control's footer on the report and
not in the Control Source. Perhaps I don't understand the question.
Regards
Liveson
----- Original Message -----
From: dawnmahc
To: ms_acc...@yahoogrou ps.com
Sent: Thursday, 02 April, 2009 19:55 PM
Subject: [ms_access] Sum formula not working in the Control Source
Hello everyone,
I'm pretty new to MS Access. I've created the following formula in the Control
Source of my Sum_Num_Unit_ Facility_ 01 field:
=Sum([Num_Unit_ Facility_ 01])
I'm getting the #Error message. I cannot figure out why this would be
happening. It seems like this would be the easiest formula in the world.
Can someone please help me?
Thank you in advance.
Dawn
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]