D
dbqph
I've created a form/subform combo in Access 2002 and have some code in the
OnCurrent section of the form that changes the recordsource of the subform
that will either:
1. Return records for a people at an address (default recordset), or,
2. Return records for an individual at an address
In a nutshell:
If Forms![frmFindBidderCheckout].[LocateBasketsBy] = 2 Then
' Guest wants bidders by address
Me.[frmBidderCheckOut].Form.RecordSource = "qryBasketsByBidderAddress"
Else
' Get just the bidder baskets
Me.[frmBidderCheckOut].Form.RecordSource = "qryBasketsByBidderID"
End If
Me.[frmBidderCheckOut].Form.Requery
intBasketCount = Nz(DCount("[GuestID]",
Me.[frmBidderCheckOut].Form.RecordSource), 0)
curAmountDue = Nz(DSum("[WinningBidAmount]",
Me.[frmBidderCheckOut].Form.RecordSource), 0)
In Access 2002, the correct number of records is returned for either
scenario. In Access 2007, the subform only displays the second case... almost
as if there is a inferred "Link Child/Link Master" setting on the subform
control (there is not).
However, in either version of Access, the values of intBasketCount and
curAmountDue are correct.
Is there a better/different way to properly refresh the content of my
subform in Access 2007 that will correctly display the contents of the
recordsource for the subform? I'm open for any/all suggestions.
TIA,
dbqph
OnCurrent section of the form that changes the recordsource of the subform
that will either:
1. Return records for a people at an address (default recordset), or,
2. Return records for an individual at an address
In a nutshell:
If Forms![frmFindBidderCheckout].[LocateBasketsBy] = 2 Then
' Guest wants bidders by address
Me.[frmBidderCheckOut].Form.RecordSource = "qryBasketsByBidderAddress"
Else
' Get just the bidder baskets
Me.[frmBidderCheckOut].Form.RecordSource = "qryBasketsByBidderID"
End If
Me.[frmBidderCheckOut].Form.Requery
intBasketCount = Nz(DCount("[GuestID]",
Me.[frmBidderCheckOut].Form.RecordSource), 0)
curAmountDue = Nz(DSum("[WinningBidAmount]",
Me.[frmBidderCheckOut].Form.RecordSource), 0)
In Access 2002, the correct number of records is returned for either
scenario. In Access 2007, the subform only displays the second case... almost
as if there is a inferred "Link Child/Link Master" setting on the subform
control (there is not).
However, in either version of Access, the values of intBasketCount and
curAmountDue are correct.
Is there a better/different way to properly refresh the content of my
subform in Access 2007 that will correctly display the contents of the
recordsource for the subform? I'm open for any/all suggestions.
TIA,
dbqph