Filtered Data Form with new additions

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

Guest

I have a form frmBuilding displaying details about a building with a subform
frmCost displaying a SUM of prices associated with that building from a
query. I have a button in frmCost that opens the form frmAddCost that is a
filtered form on BuildingID displaying all related costs associated with the
building. frmAddCost has the ability to add new item but you have to specify
the correct BuildingID otherwise the new addition will be filtered out. How
do i make it so any new items added from the filtered form have a default
value for BuildingID to equal that used in the filter.
 
"Edward Jones (Eddie)" <[email protected]> ha
scritto nel messaggio
I have a form frmBuilding displaying details about a building with a subform
frmCost displaying a SUM of prices associated with that building from a
query. I have a button in frmCost that opens the form frmAddCost that is a
filtered form on BuildingID displaying all related costs associated with the
building. frmAddCost has the ability to add new item but you have to specify
the correct BuildingID otherwise the new addition will be filtered out. How
do i make it so any new items added from the filtered form have a default
value for BuildingID to equal that used in the filter.

Hi Eddy,
you can pass the BuildingID to the form frmAddCost in DoCmd.OpenForm
OpenArgs parameter, then in BeforeInsert event you assign the ID
Me.BuildingID= Me.OpenArgs

Bye
Cinzia
 
Back
Top