473,466 Members | 1,534 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Looking to have one field based on two other fields.

Hi,

This is probably really simple but kinda has me stumped. I have taken over a
data base and am looking to modify it to make it more user friendly.
Currently, I have a Combo box with 4 separate selections. I have four
individuals that make credits based on 4 separate criteria. Currently, it
looks something like this.

[Prov_Code]
Ontario - Reg.
Ontario - Not reg.
Other - Reg.
Other - Not reg.

This box has two coloumns and the Row source is as follows "Ontario -
Reg.";"John Doe";:"Ontario - Not reg.";"Jane Doe" etc.

What I would like to do is to separate this into two combo boxs, one for
Registered or not Registered, (two selections) and another having the
provinces. The criteria I would need is as follows for each of these
individuals. I am not sure if I should be using a Dlookup, IIf, or a 3
coloumn setup or have another field set up based on the these two fields.
Any help would be much appreciated.

[Type] Registered
[Province] ON

[Type] Registered
[Province] <>ON

[Type] Not Registered
[Province] ON

[Type] Not Registered
[Province] <>ON

Thank you
David
Nov 13 '05 #1
2 1475
"David" <so*******@somewhere.ca> wrote in
news:aa*********************@news20.bellglobal.com :
Hi,

This is probably really simple but kinda has me stumped. I
have taken over a data base and am looking to modify it to
make it more user friendly. Currently, I have a Combo box with
4 separate selections. I have four individuals that make
credits based on 4 separate criteria. Currently, it looks
something like this.

[Prov_Code]
Ontario - Reg.
Ontario - Not reg.
Other - Reg.
Other - Not reg.

This box has two coloumns and the Row source is as follows
"Ontario - Reg.";"John Doe";:"Ontario - Not reg.";"Jane Doe"
etc.

What I would like to do is to separate this into two combo
boxs, one for Registered or not Registered, (two selections)
and another having the provinces. The criteria I would need is
as follows for each of these individuals. I am not sure if I
should be using a Dlookup, IIf, or a 3 coloumn setup or have
another field set up based on the these two fields. Any help
would be much appreciated.

[Type] Registered
[Province] ON

[Type] Registered
[Province] <>ON

[Type] Not Registered
[Province] ON

[Type] Not Registered
[Province] <>ON

Thank you
David

The data should be stored in a table, if it can ever change.
Employees come and go. It should have just the three columns,
Province, Registered and Administrator. I'll call it Assignments
for the purpose of this example.

The province combo should use a rowsource "SELECT DISTINCT
Province FROM Assignments;"

The Registered combo needs a rowsource
"Select Administrator, Registered FROM Assignments " _
& "WHERE Province = '" & me!cboProvince & "'"

Bind the Administrator to your main table. You can make it's
column width 0" to hide the name

Put a me.cboRegistered.requery in cboProvince's afterupdate
event

Having writ all that, you may be able to simplify the form if
each of your options can only be two states, using checkboxes.

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #2
Hi Bob,

Thank you very much for your reply. I am not that fluent in access and have
to do this on Access 97 at the moment. We will be upgrading to Access 2000
in the near future at work. I did not quite understand your programming but
was able to take an example of the 2 combo box synchronize form and modify
it to my needs. I am really amazed at what this product can do and the level
of support that you people provide through this newsgroup.

Thanks again
David


"Bob Quintal" <rq******@sympatico.ca> wrote in message
news:Xn**********************@207.35.177.135...
"David" <so*******@somewhere.ca> wrote in
news:aa*********************@news20.bellglobal.com :
Hi,

This is probably really simple but kinda has me stumped. I
have taken over a data base and am looking to modify it to
make it more user friendly. Currently, I have a Combo box with
4 separate selections. I have four individuals that make
credits based on 4 separate criteria. Currently, it looks
something like this.

[Prov_Code]
Ontario - Reg.
Ontario - Not reg.
Other - Reg.
Other - Not reg.

This box has two coloumns and the Row source is as follows
"Ontario - Reg.";"John Doe";:"Ontario - Not reg.";"Jane Doe"
etc.

What I would like to do is to separate this into two combo
boxs, one for Registered or not Registered, (two selections)
and another having the provinces. The criteria I would need is
as follows for each of these individuals. I am not sure if I
should be using a Dlookup, IIf, or a 3 coloumn setup or have
another field set up based on the these two fields. Any help
would be much appreciated.

[Type] Registered
[Province] ON

[Type] Registered
[Province] <>ON

[Type] Not Registered
[Province] ON

[Type] Not Registered
[Province] <>ON

Thank you
David

The data should be stored in a table, if it can ever change.
Employees come and go. It should have just the three columns,
Province, Registered and Administrator. I'll call it Assignments
for the purpose of this example.

The province combo should use a rowsource "SELECT DISTINCT
Province FROM Assignments;"

The Registered combo needs a rowsource
"Select Administrator, Registered FROM Assignments " _
& "WHERE Province = '" & me!cboProvince & "'"

Bind the Administrator to your main table. You can make it's
column width 0" to hide the name

Put a me.cboRegistered.requery in cboProvince's afterupdate
event

Having writ all that, you may be able to simplify the form if
each of your options can only be two states, using checkboxes.

--
Bob Quintal

PA is y I've altered my email address.

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ed Cox | last post by:
Hi, first time poster to this group looking for a little help. Knowing that there are hundreds of php applications and solutions out there, and I don't want to re invent the wheel, I am looking...
7
by: Master of C++ | last post by:
Hello Folks, I have a programming dilemma with templates and "genericity". I can think of a few solutions, but I am not sure which one is the best in terms of genetic C++ style. Any suggestions...
1
by: hico74 | last post by:
Hi all. I'm looking for a tool which should act like some kind of middleware/ logical layer bewtween the SQL server and the webbased user interface. - It should be possible to easily create...
2
by: AA Arens | last post by:
Somebody willing to assist me in the following? I want to have values from one field copied to another field when I choose choose a item from a drop down menu. I have 2 forms: 1 Company...
2
by: fstenoughsnoopy | last post by:
I have a customer order database and I need to pull a customers information, ie first name, last name, address, city, state, zip, phone, etc, into the oder table. i don't know how to go about...
11
by: Cliff Martin | last post by:
Hi, I am reading a fairly large file a line at a time, doing some processing, and filtering out bits of the line. I am storing the interesting information in a struct and then printing it out....
2
by: DeanL | last post by:
Hi guys, I'm using a subform to display a list of values from a single table. The form is showing the values in "continuous forms" view and there will only ever be two different values for the...
7
by: chanshaw | last post by:
Ok I'm looking to find the array index of the entered employee number here is my code #!/usr/bin/perl # Uses module Text::CSV # compiler directives use strict; use warnings; use Text::CSV;
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.