Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting a subform's Recordset

Status
Not open for further replies.

BAWC01

Technical User
Nov 23, 2005
79
CH
Hi

I have a form and a subform.

I search using a combo to select the records I want and create a recordset

Code:
Set rstHUTF = dbsCurrent.OpenRecordset( _
              "SELECT STAMP, OPCOO, AREA, FLOW, USTATE, UCAT, WEIGHT, SHC, ULDID, INFLTID, OUTFLTID, DEST " _
            & "FROM HIS_HUTF " _
            & "WHERE ULDID like '" & GULD_Full_ID & "' " _
            & "ORDER BY STAMP DESC, ULDID DESC", dbOpenDynaset)

I then want to set the subform's data to that recordset

How do I do it

I have tried

Code:
   DoCmd.OpenForm "HUFT_ULD_Trace_Details", acNormal
   Set Forms("HUFT_ULD_Trace_Details").Recordset = rstHUTF

But this open a new form !!

Thanks

Phil
 
Figured it out

Set Forms!HUFT_ULD_TRACE!HUFT_ULD_Trace_Details.Form.Recordset = rstHUTF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top