T
Tammy
Hello -
This problem may be due to the relationship type. I have a property form
(frmProperties) with all the general property info, and the record source =
tblProperties.
There is another form called frmBuildings - record source = tblBuildings.
There is a relationship established between tblProperties and tblBuildings.
It is a one-to-many relationship: one property can have many buildings
associated with it.
The two tables are linked on the field called strPropertyNum.
What I'd like to do on the property form is have a button that takes a user
directly to the building form, and display the buildings for that property.
It doesn't necessarily have to filter out the records, just bring me to the
first record (or, building) for that property.
I am using the Command Wizard to create a button to open a form and chose to
open the form and find specific data to display. I matched the fields on
strPropertyNum.
The button takes me to the form, but does not go directly to the matching
property number. It just brings me to the first record on the form.
I tried a macro, as well, but the macro opens the building form with the
form filtered to a new record - even though the Where Condition was set to:
[strPropertyNum]=[Forms]![frmBuilding]![strPropertyNum]
Can this not be done for a one-to-many relationship?
Without VBA, is there a way to click a button that brings a user to a form
with the records related to the specific property ? Can I bring the user to
the first record (building number) associated with the property, or to a
filtered set of buldings based on the property number? I can use the button
either way.
Thanks for any suggestions - if possible, no VBA solutions since I am
unfamiliar with that window. (But I take direction well, if that is the only
solution.)
Thanks!
This problem may be due to the relationship type. I have a property form
(frmProperties) with all the general property info, and the record source =
tblProperties.
There is another form called frmBuildings - record source = tblBuildings.
There is a relationship established between tblProperties and tblBuildings.
It is a one-to-many relationship: one property can have many buildings
associated with it.
The two tables are linked on the field called strPropertyNum.
What I'd like to do on the property form is have a button that takes a user
directly to the building form, and display the buildings for that property.
It doesn't necessarily have to filter out the records, just bring me to the
first record (or, building) for that property.
I am using the Command Wizard to create a button to open a form and chose to
open the form and find specific data to display. I matched the fields on
strPropertyNum.
The button takes me to the form, but does not go directly to the matching
property number. It just brings me to the first record on the form.
I tried a macro, as well, but the macro opens the building form with the
form filtered to a new record - even though the Where Condition was set to:
[strPropertyNum]=[Forms]![frmBuilding]![strPropertyNum]
Can this not be done for a one-to-many relationship?
Without VBA, is there a way to click a button that brings a user to a form
with the records related to the specific property ? Can I bring the user to
the first record (building number) associated with the property, or to a
filtered set of buldings based on the property number? I can use the button
either way.
Thanks for any suggestions - if possible, no VBA solutions since I am
unfamiliar with that window. (But I take direction well, if that is the only
solution.)
Thanks!