Re: The command button on my forms doesn't work, any clues why?



Okay, let's check we are talking about the same thing.

"Subform" is a special term in Access, referring to a form that is within another form. When you open the main form, the subform opens in it. When you talk about "opening a subform", this is actually a completely different form, opening in its own window, is it?

Pase the code the wizard created for you for the Click event procedure of your command button. And please tell us the data type of the fields used in the expression; that is, if you open your table in design view, is it a Text field? a Number field? a Date/Time field? ...?

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"MIKE" <MIKE@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B7DD96B9-D8C2-4E82-AF59-586A0EFE2821@xxxxxxxxxxxxxxxx
i have checked both forms [ primary and detail ] and the property setting for
" filter on load " is set to " no "..

using access 2003, i used the command button wizard to create the link from
my primary form to a detail form. i used the check box " open form with
specific records " and then selected a field from primary form and a field
from detail form . the field names were the same and used the match button
< > to link the two fields.

i select a specific record in the primary form and when clicking the command
button, it opened the sub form with only those records matching the linked
fields.

however using the exact same procedure, access 2007 opens all records in
the sub form. the only differences that im aware of is that access 2003
uses event procedure and 2007 uses an embedded macro. since all the coding
is automatically generated, and not edited by me, im not sure what is
happening.

i have tried this on several different databases using access 2007 and all
attempts have failed

all my data files have been placed in a trusted file location

"Allen Browne" wrote:

Mike, it's not clear how you are approaching this.

Forms in Access 2007 have a FilterOnLoad property.
Set this to No. If it's set to Yes, it may load with an old filter applied,
so the record you want is not in the form.

Let us know if that makes a difference. If not, provide more detail on how
you are passing the value from one to the other.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"MIKE" <MIKE@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:88577F85-A8C3-4873-9A73-F9B17E899F8D@xxxxxxxxxxxxxxxx
> did you ever resolve this problem ? ?
>
> i have also converted to access 2007 from access 2003 and have > encountered
> the same exact problem you describe . i used the command button
> extensively to transfer control from a primary form to a sub form with
> specific detail records. this procedure no longer functions properly
> using
> access 2007.
>
> if someone has responded with a solution, kindly refer me to that info
>
> thanks mike
>
> "GHouse" wrote:
>
>> I'm trying to link one form to another by a reference number which is >> in
>> both
>> forms. I've used the command button wizard which takes me to the other
>> form
>> but not to just the records I want to see. This worked fine in my 2003
>> access
>> database.



.