Change operations from Excel to Access (Validations TO ???)

S

SKelly

I used a Validation rule in Excel but how do I do the same in Access.
I have two Tables
1. Account Group 2. Account Type (in two deferent tables)
Field 1 (only one) Field 1: Field 2:
-A -1 A
-B -2 B
-3 B

How do I get a Combo box with look up info. from Account Type to only show
the options from what is selected in Account Groups. (In a Form not a query
or table).
I.E. I select “B†in the Account Group drop down. Only “2, &3†should show
up as choices.
How do I make this happen? Thank you!
 
C

Crystal (strive4peace)

Hi Susan,

you have left out important details from your question ...

"to only show the options from what is selected in Account Groups

you did not show or specify the filed(s) from Account Groups that
determine this. I am assuming you have multiple entities you are
dealing with.


Warm Regards,
Crystal
remote programming and training

http://www.YouTube.com/user/LearnAccessByCrystal

Access Basics
http://www.AccessMVP.com/strive4peace
free 100-page tutorial that covers essentials in Access

*
:) have an awesome day :)
*
 
J

John W. Vinson

I used a Validation rule in Excel but how do I do the same in Access.
I have two Tables
1. Account Group 2. Account Type (in two deferent tables)
Field 1 (only one) Field 1: Field 2:
-A -1 A
-B -2 B
-3 B

How do I get a Combo box with look up info. from Account Type to only show
the options from what is selected in Account Groups. (In a Form not a query
or table).
I.E. I select “B” in the Account Group drop down. Only “2, &3” should show
up as choices.
How do I make this happen? Thank you!

Access and Excel are different. It SOUNDS like you want a "conditional combo
box", which is easy to create on a form. As Crystal says, though, we'll need
more information about the structure and relationship of your tables.
 
S

SKelly

I have a total of three Tables total but one is combining the two first
tables and adding more detail to the overall table.
T1. Account Groups:
Fields are- Auto #: Account Group:
1 Alpha
2 Bravo
3 Charlie
4 Delta

T2. Account Types:
Auto # Account Group: Account Type:
(This is a drop down (text box)
pulled from above table)
1 Alpha IT support
2 Charlie Pricing
3 Bravo Maintenance
4 Alpha Security
5 Delta Facility
6 Alpha Pricing


T3. Main Account info.:
Auto #: Account Group: Account Type: Name:
Work location:
(Both are pulled from table 1 & table 2)
Alpha IT support Jeff Smith 1
2 Charlie Pricing Amy Jones 2
3 Bravo Maintenance Joe Backer 1
4 Alpha Security Mike Keller 1
5 Delta Facility Jan Johnson 2
6 Alpha IT support John Doe 1


When I add a new person to my form and select ….Alpha from my Account Group
(drop down box) I would like my Account Type to only show those options that
fall under that Account Group. (Example: Alpha) (Result: Only the choices IT
support, Security & Pricing show up)

I would also like to apply this to a multi selection search or filter form.
I hope this is enough information.
 
J

John W. Vinson

I have a total of three Tables total but one is combining the two first
tables and adding more detail to the overall table.
T1. Account Groups:
Fields are- Auto #: Account Group:
1 Alpha
2 Bravo
3 Charlie
4 Delta

T2. Account Types:
Auto # Account Group: Account Type:
(This is a drop down (text box)
pulled from above table)
1 Alpha IT support
2 Charlie Pricing
3 Bravo Maintenance
4 Alpha Security
5 Delta Facility
6 Alpha Pricing

It sounds like you're another victim of Microsoft's misdesigned, misleading,
monstrous Lookup Field misfeature. See
http://www.mvps.org/access/lookupfields.htm
for a critique. The Account Group in your T2 APPEARS to contain "Alpha" but it
does not; it actually contains 1 - a numeric link to T1's primary key.
T3. Main Account info.:
Auto #: Account Group: Account Type: Name:
Work location:
(Both are pulled from table 1 & table 2)
Alpha IT support Jeff Smith 1
2 Charlie Pricing Amy Jones 2
3 Bravo Maintenance Joe Backer 1
4 Alpha Security Mike Keller 1
5 Delta Facility Jan Johnson 2
6 Alpha IT support John Doe 1

Same applies. The Account Type is actually storing a number (e.g. you see
"Pricing" but what's stored is 6.
When I add a new person to my form and select ….Alpha from my Account Group
(drop down box) I would like my Account Type to only show those options that
fall under that Account Group. (Example: Alpha) (Result: Only the choices IT
support, Security & Pricing show up)

You can do this on a Form very easily. AFAIK you cannot do it in a table. Bind
a combo box to the Account Type field, based - not on your T3 - but on a Query
such as

SELECT [AccountTypeID], [Account Type] FROM T2 WHERE T2.[Account Group] =
Forms!YourFormName!YourFirstComboName ORDER BY [Account Type];

You'll need to adjust field and table names of course. You will also need to
Requery this combo box in the afterupdate event of the first combo.
I would also like to apply this to a multi selection search or filter form.
I hope this is enough information.

Well, a bit more info about what you mean by a "multi selection search or
filter form" would help. Multiselect listboxes can be used for searching but
it's a bit clumsy and requires some VBA code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top