ComboBox Searching

R

RyanPitt

I am currently putting together a database to analyse some date and currently
havein a form; 2 combo boxes with a 'Text' type; 3 combo boxes with a
'Yes/No' type; and the last i would like to be able to retrieve a search of
e.g. 50 people to 250 people.

And then for all this data to be pulled from the main table and put into a
temporary table/form, which i can then look at,

I have looked at doing this a number of different ways, but nothing seems to
work, anyone got any ideas?

Cheers
 
J

John Vinson

I am currently putting together a database to analyse some date and currently
havein a form; 2 combo boxes with a 'Text' type; 3 combo boxes with a
'Yes/No' type; and the last i would like to be able to retrieve a search of
e.g. 50 people to 250 people.

And then for all this data to be pulled from the main table and put into a
temporary table/form, which i can then look at,

I have looked at doing this a number of different ways, but nothing seems to
work, anyone got any ideas?

Cheers

Well... you're mixing apples and oranges here.

Tables store data. Forms are windows which can be used to display or
edit data stored in Tables. It sounds like you've made the (very
common) error of starting with a Form and then back-designing a table
to fit the data.

Similarly, a combo box is a data editing and display tool, not a
datatype. You don't store a combo box in a table - you USE a combo box
as a method of storing data (a number -1 or 0 for a Yes/No field,
text, or a numeric ID) into a table.

Thirdly, you are making another common error by assuming that you need
to put data into a temporary table in order to look at it. You don't:
that's what Queries are for!

The place to start is by turning off your computer, leaving the room,
and scrounging around for a pencil (with a good eraser, if you're like
me <g>) and a pad of paper. Identify what kinds of Entities -
real-life people, things, or events - are of importance to your
application (people, obviously, but I cannot tell what else from your
post). Each kind of Entity will have its own table - e.g. a People
table might have fields PersonID (a unique primary key, names are NOT
suitable since they are neither unique nor stable), LastName,
FirstName, and other biographical data; you might have "lookup tables"
for commonly used values for your combo boxes, though I'd advise
AGAINST ever using Microsoft's misleading and misdesigned "lookup
field" type; you'll have other tables as well.

You then need to identify how your tables are related: one to one
(very rare and at this stage probably a mistake); one to many
(universal); many to many - which requires yet another table, a
"resolver table" to record the relationship.

Once you have the table structure designed, THEN start thinking about
Forms and Subforms to enter data into the tables.

You can - and will - base a Form on a Query, or use the Filter by Form
utility on a Form, to selectively display data about some particular
person or subset of people.

Post back with a more detailed description of your data if you want
more help!

John W. Vinson[MVP]
 
R

RyanPitt

Not at all.

I have a few table full of data and am wanting to produce a form to search
on/filter the data in each individual table, ie one form per table to search
on.

To compare similar sets of data.
 
J

John Vinson

Not at all.

I have a few table full of data and am wanting to produce a form to search
on/filter the data in each individual table, ie one form per table to search
on.

To compare similar sets of data.

Well... ok. Create forms, then; there's an Autoform wizard.

To see data from different tables on the same screen, you can use an
unbound Form with two or more Subforms, one for each table.

If you'ld care to post some description of your table structure, and
some details of what you want to see (bearing in mind that you can see
the structure of your data, and we cannot), we'll be glad to help!

John W. Vinson[MVP]
 
R

RyanPitt

I have 576 schools in a table with figures on income and expenditure etc,

Each school has info for Field Names 'Sector', 'Type', 'SixthForm',
'Nursery', 'LondonWeighting' and 'FundedNOR'.

Sector = What type of school = text
Type = The type of age range = text
Sixthform = Does it have a sixth form = Yes/No
Nursery = Does it have a nursery = Yes/No
LondonWeighting = Does it have a London weighting = Yes/No
FundedNOR = Number of pupils = Number

i want to be able to search on these bits of data, which i can do by using a
query, but i need it put into a form, for schools to use.
so for example you could choose:

Sector: Primary
Type: Infant
Sixthform: No
Nursery: Yes
LondonWeighting: Yes
FundedNOR: Between 50 and 500

and i would only want the information for the schools that match those
criteria so i can compare the way schools spend their money.

is that any clearer?


Ryan
 
J

John Vinson

i want to be able to search on these bits of data, which i can do by using a
query, but i need it put into a form, for schools to use.
so for example you could choose:

Sector: Primary
Type: Infant
Sixthform: No
Nursery: Yes
LondonWeighting: Yes
FundedNOR: Between 50 and 500

and i would only want the information for the schools that match those
criteria so i can compare the way schools spend their money.

The simplest way would be to create a Form based on your table; and
use the "Query By Form" feature in Access to do just exactly what you
ask.

There's no need to open the query datasheet. The Query By Form feature
will query the data for you invisibly, and just show the results.

John W. Vinson[MVP]
 
Top