S
s_wadhwa
Hi,
Can anyone can answer my query that how we can set Data on Subform from
a recordset.
when I'm trying to set it like
Set frm1 = Forms("fsubroomsdept")
Set frm1.Recordset = rstQry
str1 = rstQry!BuildingName
Do While rstQry.EOF <> True
For Each ctl1 In frm1
If TypeOf ctl1 Is TextBox Or TypeOf ctl1 Is ComboBox Then
Select Case ctl1.Name
Case "BuildingName"
ctl1.SetFocus
ctl1.Value = str1
Case "buildingNumber"
ctl1.SetFocus
ctl1.Value = str2
Case Else
Exit Sub
End Select
End If
Next
rstQry.MoveNext
Loop
it throws an error saying that you can't set a value its read only.
please help any comments/ suggestions are welcome.
thanks,
Shalini
Can anyone can answer my query that how we can set Data on Subform from
a recordset.
when I'm trying to set it like
Set frm1 = Forms("fsubroomsdept")
Set frm1.Recordset = rstQry
str1 = rstQry!BuildingName
Do While rstQry.EOF <> True
For Each ctl1 In frm1
If TypeOf ctl1 Is TextBox Or TypeOf ctl1 Is ComboBox Then
Select Case ctl1.Name
Case "BuildingName"
ctl1.SetFocus
ctl1.Value = str1
Case "buildingNumber"
ctl1.SetFocus
ctl1.Value = str2
Case Else
Exit Sub
End Select
End If
Next
rstQry.MoveNext
Loop
it throws an error saying that you can't set a value its read only.
please help any comments/ suggestions are welcome.
thanks,
Shalini