Access 2003 Problem with Subform Query Order

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello:

I would appreciate any help someone could offer on a problem we are
encountering with Access '03, everything works ok in 2000 and xp. We have a
master-detail form in which the detail depends upon a field in the master, as
follows:

Select.... WHERE (((IRDB_PROJECT_VERSIONS.PI_PROFILE_PERSON_ID)=[Forms]![PI
View Master]![PIView]![txtProfilePersonID]).

In Access 2000/XP, the detail loads correctly, but in '03, no errors, but
the detail is blank. I have done some debugging and it appears as if
txtProfilePersonID is blank at the time the detail tries to load.

Would anyone know of a workaround for the 2003-specific problem?

thank you in advance.
Harvey
 
usually a subform shows records from a table that is on the "many" side of a
one-to-many relationship, and the main form shows the records from the table
on the "one" side. is that your setup? and are the two *tables* linked by
the "person id" fields in both? if so, you don't need to set criteria on the
subform's RecordSource query. just set the links in the subform control's
LinkChildFields and LinkMasterFields properties (in the main form).

if your setup is different, please describe it.

hth
 
I'm trying to understand this lookup in the form, if it a field in the main
form, then you have one level to much, it should be
3 levels - [Forms]![MainFormName]![FieldName]

you have 4 levels - [Forms]![PI View Master]![PIView]![txtProfilePersonID]

If it a field in the sub form, then try adding form before the name of the
field
[Forms]![PI View Master]![PIView].Form![txtProfilePersonID]
 
Thanks very much to you both for your replies. Ofer - you had it right - I
just changed in my query:
[Forms]![PI View Master]![PIView]![txtProfilePersonID]
to
[Forms]![PI View Master]![PIView].Form![txtProfilePersonID]


and now it works in both access 2003 and 2000. Why it worked all these
years in Access XP and below in the old form is a mystery to me. Would you
know why?

Anyway, thank you very very much for you assistance on this.

Regards,
Harvey




Ofer said:
I'm trying to understand this lookup in the form, if it a field in the main
form, then you have one level to much, it should be
3 levels - [Forms]![MainFormName]![FieldName]

you have 4 levels - [Forms]![PI View Master]![PIView]![txtProfilePersonID]

If it a field in the sub form, then try adding form before the name of the
field
[Forms]![PI View Master]![PIView].Form![txtProfilePersonID]

--
\\// Live Long and Prosper \\//
BS"D


Harvey said:
Hello:

I would appreciate any help someone could offer on a problem we are
encountering with Access '03, everything works ok in 2000 and xp. We have a
master-detail form in which the detail depends upon a field in the master, as
follows:

Select.... WHERE (((IRDB_PROJECT_VERSIONS.PI_PROFILE_PERSON_ID)=[Forms]![PI
View Master]![PIView]![txtProfilePersonID]).

In Access 2000/XP, the detail loads correctly, but in '03, no errors, but
the detail is blank. I have done some debugging and it appears as if
txtProfilePersonID is blank at the time the detail tries to load.

Would anyone know of a workaround for the 2003-specific problem?

thank you in advance.
Harvey
 
I'm glad you got it sorted out, but sorry I don't know how it use to work in
previous version of Access, I always used the path as I should you.

--
\\// Live Long and Prosper \\//
BS"D


Harvey said:
Thanks very much to you both for your replies. Ofer - you had it right - I
just changed in my query:
[Forms]![PI View Master]![PIView]![txtProfilePersonID]
to
[Forms]![PI View Master]![PIView].Form![txtProfilePersonID]


and now it works in both access 2003 and 2000. Why it worked all these
years in Access XP and below in the old form is a mystery to me. Would you
know why?

Anyway, thank you very very much for you assistance on this.

Regards,
Harvey




Ofer said:
I'm trying to understand this lookup in the form, if it a field in the main
form, then you have one level to much, it should be
3 levels - [Forms]![MainFormName]![FieldName]

you have 4 levels - [Forms]![PI View Master]![PIView]![txtProfilePersonID]

If it a field in the sub form, then try adding form before the name of the
field
[Forms]![PI View Master]![PIView].Form![txtProfilePersonID]

--
\\// Live Long and Prosper \\//
BS"D


Harvey said:
Hello:

I would appreciate any help someone could offer on a problem we are
encountering with Access '03, everything works ok in 2000 and xp. We have a
master-detail form in which the detail depends upon a field in the master, as
follows:

Select.... WHERE (((IRDB_PROJECT_VERSIONS.PI_PROFILE_PERSON_ID)=[Forms]![PI
View Master]![PIView]![txtProfilePersonID]).

In Access 2000/XP, the detail loads correctly, but in '03, no errors, but
the detail is blank. I have done some debugging and it appears as if
txtProfilePersonID is blank at the time the detail tries to load.

Would anyone know of a workaround for the 2003-specific problem?

thank you in advance.
Harvey
 

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

Back
Top