Why doesn't Access 2007 work? linked forms and reports

G

Guest

I have two different databases, one has a button which runs a report query
which should pick up the value in a field on the form the button is on. This
worked fine in Access 2000,XP and 2003 and no longer works in 2007.

The other database has a button on a form which links to another form for
Specific Data to Display, both the linked fields are the same type, length
etc.. When the form opens it displays the first record (all records). This is
basically the same problem as above.

Why does linked forms and reports no longer work in Access 2007 yet the
option to use it still exists?
 
D

David F.

Access 2007 and 2003 will dissable some harmful features from Access MDB
files. The easiest way to solve this problem is to move your MDB to a
trusted location on your computer or set the trust for the current MDB
location. To do this Open Access 2007 and click on the "Office" button in
the upper left corner of the title bar. Then click on the Access Options
button on the status bar at the bottom of the window that just opened. Then
click the Trust Center button. Click the Trust Center Settings button. Then
click Trusted Locations. Now add the path to your MDB by using the Add New
Location button at the bottom of this form.

Dave
 
G

Guest

I have already setup the trust centre settings as you have stated, this makes
no difference. Its a simple enough request for Access to link from one form
to another based on the value in a field. It works fine if the form is a
subform, then the correct set of detail records are returned, if it is a
linked form it just shows all records.

Thanks
 
J

John W. Vinson

I have already setup the trust centre settings as you have stated, this makes
no difference. Its a simple enough request for Access to link from one form
to another based on the value in a field. It works fine if the form is a
subform, then the correct set of detail records are returned, if it is a
linked form it just shows all records.

How are you opening the other form? If you're just using the wizard's open
form button code, that's exactly what it will do: open the form showing all of
the records in that form's recordsource. The second form neither knows nor
cares where it was opened *from*!

If you want the second form to display a subset of records based on the first
form, then either base it on a Query referencing the first form's linking
field control as a criterion, or use the WhereCondition argument in the
OpenForm code. Perhaps you could post the VBA code or macro that you're using
to open the second form.

John W. Vinson [MVP]
 
G

Guest

I have always been able to do this in 2003 and previous versions.

I am repeating the process as I type this.

I am inserting a button onto Form A and the Command Button Wizard is
displayed.
I am selecting Form Operations then Open Form.
I am selecting Form B from the list.

I now have two options:-
Open the form and find specific data to display
or
Open the form and show all the records.

I am choosing to find specific data to display option.
I am now select the two matching fields (which are related) in both forms.
As it requests.
Then adding the button text as requested.

When I display the form, and click the button. Form B appears but displays
all records, starting with the first.

I know I have done this in previous versions and not had a problem. I also
have a similar problem where I am trying to pass a value from a field on a
form to a query so that when the user clicks the button the query runs, takes
the field value to run the query, it works until I base a report on that
query. The report displays all records.
 
J

John W. Vinson

When I display the form, and click the button. Form B appears but displays
all records, starting with the first.

I know I have done this in previous versions and not had a problem. I also
have a similar problem where I am trying to pass a value from a field on a
form to a query so that when the user clicks the button the query runs, takes
the field value to run the query, it works until I base a report on that
query. The report displays all records.

Sounds to me like a bug in the 2007 wizard!

Please post the SQL of the query. It make no sense at all that a query returns
the right records by itself, and returns all records when used as the
recordsource of a Report. Doublecheck that it actually *is* the report's
recordsource!

John W. Vinson [MVP]
 
N

Niccy King-Andersen

Hi,

I just wondered if this was ever resolved. I am having exactly the same problem.

To add to the confusion, when form B is opened (and incorrectly displaying all records) - it is showing as 'filtered'!

I would appreciate a solution to this if anyone has one
 

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