one to one relationships

J

James Chevers

I hope i am explaining this right, I have created a very simple database in
microsoft access to contain information and does not need to preform any
calculations. It simply stores data like pages from a survey. The problem i
am facing is that i have for example 300 records and 6 forms and 6 tables all
of them are related with a one to many relationship and the database works.
However when i am on my primary page and reviewing record # 6 for example,
when i click on my button linking to my next form, the record resets to 1 and
i have to scroll to #6. is there a way i can set my database up so when i
select a record in my main form that it will immediatly select that record
when i open up my other forms?

please help!!!!
 
J

Jackie L

James,
Either use your wizard for opening the second form to show only specific
records or base your second form off a query which uses the first form as
criteria.

Hope this helps.
 
A

a.t.brooks

Hi James
There are a few ways to do this.
One way is to write a query and build your other forms from this
query.
Include the key linking the main table with the other table in the
query and then in the criteria write

[Forms]![name_of_main_form]![control_name_of_key_on_main_form]

where the "name_of_main_ form" is the name of the main form, and the
control_name... is the name of the control designating which record
you would like to see (right click and look under Name).

Not sure if that's as clear as it could be. If you're still struggling
post back and I'll try and explain it a bit better
There's also probably a much simpler way to do this (but it's how I
make it work).


Tony
 
J

John W. Vinson

It simply stores data like pages from a survey. The problem i
am facing is that i have for example 300 records and 6 forms and 6 tables all
of them are related with a one to many relationship and the database works.

.... but it doesn't work as well as it could.

You've fallen into the very common "one field per question" trap. That's
"committing spreadsheet" and is not the best design for survey type data.

How would you like...
- One form, with a subform?
- Any number of questions?
- The ability to add, delete, change, or move questions without having to
change anything in your table, query or form structure?

If so, take a look at a properly normalized survey application:

http://www.rogersaccesslibrary.com/Otherdownload.asp?SampleName='At Your Survey 2000'
 
Top