The following syntax is giving me an 3075 error message:
If Not IsNull(DLookup("ID", "Training Details"![ClientID]='" & MySet![ClientID] & "' AND TrainingDetails![Date of Training]=" & mySql![Date of Training]))
Through the forum I found a posting to handle the error which is great! BUT naturally it bombs on what I want it to do.
This is when I realised:
1. When the listbox entry is inserted into the temporary
table (although the word temporary isn't true as I
don't remove it) it removes it from the listbox so
prevent the user from adding to the subform the same
client. I would like to retain this!
2. But this means that the recordcount of the listbox is
Recordcount - 1 e.g. starts of at 78 and when the
user selects the client, reduces for each client.
3. The subform (datasheet) displays the newly added
entry into the tblClientSelect but this table
doesn't have the date of training copied and when
I tried to go that way, I had all sorts of problems.
4. The "process" command button runs the code to open
the required report with the currently selected
clients. This works exactly as I wanted it and
don't have a problem.
5. I also have in the "process" button the above syntax
so that when the user selects "process" it updates
the Training Details table so that next time the
user runs the "qryOverdue" it only picks up those
records that are overdue where the "OverdueLetter"
is blank. Thus preventing the user having to deal
with the same overdue clients each time.
What I need to know is how can I refresh the original recordcount for the listbox after the selection has been made which obviously removes it so that I can compare the ClientID and Date of Training with those records in the Training Details table so that I can insert a date for that particular client for that particular Date of Training?
Angelique
If Not IsNull(DLookup("ID", "Training Details"![ClientID]='" & MySet![ClientID] & "' AND TrainingDetails![Date of Training]=" & mySql![Date of Training]))
Through the forum I found a posting to handle the error which is great! BUT naturally it bombs on what I want it to do.
This is when I realised:
1. When the listbox entry is inserted into the temporary
table (although the word temporary isn't true as I
don't remove it) it removes it from the listbox so
prevent the user from adding to the subform the same
client. I would like to retain this!
2. But this means that the recordcount of the listbox is
Recordcount - 1 e.g. starts of at 78 and when the
user selects the client, reduces for each client.
3. The subform (datasheet) displays the newly added
entry into the tblClientSelect but this table
doesn't have the date of training copied and when
I tried to go that way, I had all sorts of problems.
4. The "process" command button runs the code to open
the required report with the currently selected
clients. This works exactly as I wanted it and
don't have a problem.
5. I also have in the "process" button the above syntax
so that when the user selects "process" it updates
the Training Details table so that next time the
user runs the "qryOverdue" it only picks up those
records that are overdue where the "OverdueLetter"
is blank. Thus preventing the user having to deal
with the same overdue clients each time.
What I need to know is how can I refresh the original recordcount for the listbox after the selection has been made which obviously removes it so that I can compare the ClientID and Date of Training with those records in the Training Details table so that I can insert a date for that particular client for that particular Date of Training?
Angelique