I will try this, the button I understand and the date add also, just not
clear on adding 100 records, were the criteria is completed yes and service
end is null.
chris
> It sould like you just need to add a button to go to a new record with code
> like the following:
[quoted text clipped - 24 lines]
> > thanks for any help
> > Chris
ParrotGirl - 23 Jan 2008 00:03 GMT
This is what I have so far, It works on one record at a time only.
Private Sub CmdAddPoolCare_Click()
DoCmd.GoToRecord , , acNewRec
If Me.NewRecord Then
Me.ServDate = DMax("ServDate", "SERVICE TABLE") + 7
End If
End Sub
I need to add this to the code
If Me.Completed = False (pool care was not completed) (AND/OR)
If Me.[Job Table]. PoolCareDay = is not null (no longer on pool service)
Then do nothing (do not add record)
If Me.[SERVICE TABLE].[Completed] = True and If Me.[Job Table]. PoolCareDay
= is null then add record
Also, how about a msg box that 1. Confirms that you want to add records, and
2. Gives you an account of how many you are changing.
As I Said before, my tech updates at least 100 jobs per week. So is there
some place that I need to link JOB TABLE.JOBID TO SERVICE TABLE.JOBID when
it add’s new records?
> I will try this, the button I understand and the date add also, just not
> clear on adding 100 records, were the criteria is completed yes and service
[quoted text clipped - 29 lines]
> > > thanks for any help
> > > Chris
Jackie L - 23 Jan 2008 02:06 GMT
Since I am not sure on your data structure, you could use an Append Query if
you have the 100 services in a table, then have the date field added in the
query with the same expression as mentioned earlier. Attach the running of
the Append query to a button like:
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryAppendQueryName"
DoCmd.SetWarnings True
Me.Requery
Hope this helps
> I will try this, the button I understand and the date add also, just not
> clear on adding 100 records, were the criteria is completed yes and service
[quoted text clipped - 29 lines]
> > > thanks for any help
> > > Chris