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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datasheet form is empty

Status
Not open for further replies.

RJRatLD

Programmer
Jun 23, 2003
6
0
0
GB
Hi, hopefully someone can explain why, when the code below is run I get a form opened in datasheet view with the correct number of rows but no columns.

The form frmData is an empty form set to datasheet view, i have a combo box on another form with a list of the queries in the database and a button, that when pressed runs the code below.

Is there something else i need to be doing to get the columns to display?

Private Sub cmdOpen_Click()

Set q = CurrentDb.QueryDefs(cboRptSel.Value)
Set rs = q.OpenRecordset
Set f = New Form_frmData
f.Caption = cboRptSel.Value
Set f.Recordset = rs
f.Visible = True
End Sub

In anticipation of your help :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top