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!

Subform in an Access project

Status
Not open for further replies.

genevi

Technical User
Jun 28, 2000
4
CA
Hi everyone,<br><br>I am working in an Access project connected to a SQL Server database.<br><br>In VB I am not able to access the subform of a form.<br><br>I do<br><br>Forms!SubfrmSearchHistoReg.RecordSource = &quot;SELECT * FROM HistoryRegulation1991-1997 &quot; _<br>&nbsp;&nbsp;&nbsp;&nbsp;& strWhereHistReg1<br><br>It telling me that he cannot find the subform &quot;SubfrmSearchHistoReg&quot;<br><br>Thanks<br>Genevi<br><br>
 
You need to reference the main form as well as the subform.

For example if your main form is named frmMain the syntax would be as follows:

Forms!frmMain!SubfrmSearchHistoReg.Form.RecordSource = &quot;SELECT * FROM HistoryRegulation1991-1997 &quot; _
& strWhereHistReg1

deed59


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top