Open the form and find specific data to display - button (1 Viewer)

bippedibopp

New member
Local time
Today, 06:16
Joined
Nov 8, 2009
Messages
3
Hi!
I am trying to add a command button to open a second form. I am using the wizard and I have ticked off "open the form and find specific data to display", but when I press the button, the form opens and displays ALL data. I am super new to access and I want to avoid any programming. Not that it wouldn't be great to learn, but I want to keep the database as simple as possible if someone else (as fresh as me) has to make updates.

This is really doing my head in and I would be grateful for some answers!:)
 

missinglinq

AWF VIP
Local time
Today, 00:16
Joined
Jun 20, 2003
Messages
6,423
After selecting "Open the form and find specific data to display" you have to hit "Next" and will be presented with a screen with the text "Which fields contain matching data the button can use to lookup information?" Below this are two boxes to select the field in each table you wish to use to "match" up the records.

The only way I could replicate your problem was to hit "Finish" instead of "Next" and thus skip the screen where you tell Access how to match up the records in the two forms.

I'd delete the button and try again.
 

bippedibopp

New member
Local time
Today, 06:16
Joined
Nov 8, 2009
Messages
3
Hi and thanks for the reply!

I already did what you explained. I matched one field from the first form to the same field in the second form and it did not make a difference. The second form still displays all data. I even had my nerdy brother at my place yesterday and he couldn't figure it out (he managed to write and get the code to work in VBA).

I have googled the issue and it seems others have the same problem with access 2007.

I also tried to use the form wizard to create a subform and when prompted for either to insert the second form as subform or as link i chose link. The result is a button in the first form which WORKS. The problem is that I wish to make a form from scratch and not use the form wizard.

Hmmm...I really wish I were a guru at this "game" right now, but I'm not so I'll have to wait for someone else to figure this one out for me:)
 

John Big Booty

AWF VIP
Local time
Today, 14:16
Joined
Aug 29, 2005
Messages
8,263
Perhaps if you can post a copy of your DB ('03 format if possible) someone will have a look and see what is (not) going on.
 

bippedibopp

New member
Local time
Today, 06:16
Joined
Nov 8, 2009
Messages
3
Thanks John! Yesterday I got my access for dummies workbook with cd. I found an example that showed exactly the task I wanted to perform with my own DB. Guess what...I couldn't get that to work either even thoug I followed every single step. Fortunately the cd had the "after" files as well, and when I tried the button (made in the exact same manner as described in the text. how hard can it be...ticking of boxes in a wizard)...it WORKS! So I went into the embedded macro for "my" button and also the button in the completed example and it turns out they read two different things?! I am beginning to think there is something not functioning with access on my computer and I will try and repair this morning. Below I have pasted the two macros:

1) Not functioning: frmAlbums; Form; ; "[ArtistID]=" & [ArtistID]; ; Normal

2) Functioning: frmAlbums; Form; ; [ArtistID]=[Forms]![frmArtists].[ArtistID]; ; Normal

It seems the wizard in "my" access does not create the correct macro?!

What is the difference between these two expressions?

By the way I tried to repair access but it did not make a difference...
 

brother

Programmer
Local time
Today, 06:16
Joined
Mar 30, 2009
Messages
40
I've thrown together a db in ACC2003 to try to illustrate your problem as I see it.
ACC2003 does not use embedded macros like ACC2007, so this is all done in VBA.

In my example there are three variarions of the where condition that is passed to another form.
1) The where condition from your database that doesn't work.
2) The where condition that is created with ACC2003 button wizard.
3) The where condition from the dummies example.

All of these examples works in ACC2003, so this suggest that the embedded macros in ACC2007 has another way of handling this where condition. The strange thing is that the where condition that is created in ACC2007 by default does not work. I really dont know why....

Anyone else?
 

Attachments

  • WhereSample.mdb
    204 KB · Views: 295

Users who are viewing this thread

Top Bottom