"Geoff" <gf****@freenetname.co.uk> wrote in message
news:ON********************@brightview.com...
I have 2 fields in a subform that I want to clear called [Date] - this
works and [Session] - which doesn't . Session is populated by 4 choices
from a combo box. All I want to do is clear the combo ready for
reselection.
Forms![Hirer].Form![Bookings Subform]![Date] = ""
Forms![Hirer].Form![Bookings Subform]![Session] = ""
Forms![Hirer].Form![Bookings Subform].[Date].SetFocus
I also want to setfocus to [Date] in the subform. This doesn't work
either.
Any help would be genuinely appreciated
Geoff
Should you check the number of records in the subform? What if it is zero?
What if it is more than one? Or perhaps the 'clearing routine' should only
apply to the current record?
If you are doing much Access work you could also use a naming convention, so
that you can distinguish between the control and the database field which is
displayed, e.g. cboSession is a combo bound to the field 'Session' and
txtDate is a textbox bound to the field Date - except that Date is a
reserved word and should be avoided (together with other reserved words such
as Name). Better to use BookingDate or whatever.