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

Deleting a field in a continuous form 1

Status
Not open for further replies.

osi2301

Programmer
Jul 3, 2004
75
AU
I have a a form and a linked subform. The subform is a continuous form. The continuous form may have anywhere from 1 to 50 records. I need to be able to delete a field in the subform. I have created a VB command: [change1]=" ". to clear the field entry but it will only clear the first record.

Can you possibly help me with a way to clear the selected field for all records in the subform?
 
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
Me.Dirty = False
With rs
.MoveFirst
While Not .EOF
.Edit
!change1 = " "
.Update
.MoveNext
WEnd
End With
Set rs = Nothing

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
YES. That did it. Thanks a lot. It worked perfect
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top