Populate field

IanT

Registered User.
Local time
Today, 22:45
Joined
Nov 30, 2001
Messages
191
Hi

I have a calendar control on a form. When I click on a date it populates a field in a subform.
How can I get the code to move to the next blank record in the subform so when I click on a new date it populates the next record!

This is the code I us to populate the subform:

[tblSickLeave subform].Form![StartDay].Value = ocxCalendar.Value
 
Hi,

I think you need something like:
[tblSickLeave subform].Recordset.AddNew
if there is no blank record, or
[tblSickLeave subform].Recordset.MoveNext
if you are sure the next record will be blank.

Hope that helps you,
Keith.
 

Users who are viewing this thread

Back
Top Bottom