I have a form SearchTestDetails ,which when loads first time , shows all the records from a table.Linkchildfields , LinkMasterFields set null and sourceobject has the table name.
Its has text fields where a user can enter search criterian,and on clicking ok the same form should load with filtered data.
after filtering , also Linkchildfields , LinkMasterFields set null and sourceobject has the table name , same.
Expand|Select|Wrap|Line Numbers
- Set frmTempForm = New Form_SearchTestDetails
- With frmTempForm
- .RecordSource = strSql
- .Visible = True
- '.Visible=True
- End With
I also did
Expand|Select|Wrap|Line Numbers
- With db
- Set qdf = .CreateQueryDef("tmpTestInfo", strSql)
- DoCmd.OpenQuery "tmpTestInfo"
- Set frmTempForm = New Form_SearchTestDetails
- With frmTempForm
- .RecordSource = tmpTestInfo
- .Visible = True
- '.Visible=True
- End With
- .QueryDefs.Delete "tmpTestInfo"
- End With
- db.Close
- qdf.Close
at the line .RecordSource = tmpTestInfo , if i hold the mouse over tmpTestInfo it shows as nothing.
i also tried this , setting values of the above mentioned fields at run time.
Expand|Select|Wrap|Line Numbers
- With db
- Set qdf = .CreateQueryDef("tmpTestInfo", strSql)
- DoCmd.OpenQuery "tmpTestInfo"
- Set frm = New Form_SearchTestDetails
- [Form_SearchTestDetails].subSearchTestDetails.SourceObject = tmpTestInfo
- [Form_SearchTestDetails].subSearchTestDetails.LinkChildFields = ""
- [Form_SearchTestDetails].subSearchTestDetails.LinkMasterFields = ""
- Set frmTempForm = New Form_SearchTestDetails
- With frmTempForm
- .RecordSource = strSql
- .Visible = True
- '.Visible=True
- End With
- .QueryDefs.Delete "tmpTestInfo"
- End With
- db.Close
- qdf.Close
On the fly , i need to set the property values.
Need urgent help !!
Thanks in advance
Titli