outline for code

  • Thread starter Thread starter bj
  • Start date Start date
B

bj

I have an Access 2003 db that requires two records per day, one for day
shift and one for night shift. It incudes a date feild and a shift field
along with the data fields etc.

What I want to do is write a module that will scan the db from a given date
to check for null entries and put the result into a table for later
printing/use. IE, an audit of where someone has not entered their shift
data. Currently I do this manually, but want to allow other users to do this
themselves automatically.

Problem is, I've not programmed for many years (GWBasic). I can probably
work my way slowly through the actual programming, but I would appreciate
assistance in an outline of the steps I need to take.

Any assistance greatfully received.

BJM
 
How about a SQL Script that looks like this:

SELECT * FROM tablename WHERE datafield = ""

Simple and you would have to setup a way to see this, maybe through a
report, but it should work.
 
bj said:
I have an Access 2003 db that requires two records per day, one for day
shift and one for night shift. It incudes a date feild and a shift field
along with the data fields etc.

What I want to do is write a module that will scan the db from a given date
to check for null entries and put the result into a table for later
printing/use. IE, an audit of where someone has not entered their shift
data. Currently I do this manually, but want to allow other users to do this
themselves automatically.

If not allowing skipped fields is important then you should not allow Null
entries. This is a function of table and form design.
You have no need to move the records and should not do so. Reports and
further use can be done for the existing table and duplicate records or
tables will lead to problems sooner than later.
 
Thanks Mike. Indeed, I have set the input to require compulsory fields to
contain data, and the actual databasing works very well. The problem occurs
when no record at all is entered for the shift and it is these that require
auditing as the value of the data entered / not entered has significant
flow-on effects.

Cheers
BJ
 
I need to clarify the situation here. The record will only exist if the user
enters data for their shift. The date is generated from the input. If the
user dosn't enter their data, no record exists for that shift. It is these
that I need to order.... where no record exists. Hence I can't select
records with null entries as the records don't exist in the 1st place. (That
was a good try though).

The structure I was thinking of was along the lines of
1. Set start date for search.
2. Check if record for date(n) exits and if so, does record for shift(A)
exist. If so, does record for shift (B) exist, if so move on. If not append
a blank record to table. Make entry into a specific field for later use.

Any further suggestions would be welcome.

Thanks

BJ
 
bj said:
I need to clarify the situation here. The record will only exist if the user
enters data for their shift. The date is generated from the input. If the
user dosn't enter their data, no record exists for that shift. It is these
that I need to order.... where no record exists. Hence I can't select
records with null entries as the records don't exist in the 1st place. (That
was a good try though).

If the record does not exist ther is nothing that can be done to find it.
You could print a report showing what does exist and scan for missing dates.

Since the dates and shifts are known you could create them with a query in
advance, then check to see if there was an entry made. This would be a valid
use for Null.
 
There has to be away. what about utilising the error message. After all,
you can search for a record and get a "no record foud" hence, if this was
utilised and upon finding no record, a new record was appended ???? and this
record would add data to the "not_entered" field.??

BJ
 
bj said:
There has to be away. what about utilising the error message. After all,
you can search for a record and get a "no record foud" hence, if this was
utilised and upon finding no record, a new record was appended ???? and this
record would add data to the "not_entered" field.??

BJ
Certainly you could sit at the computer and search for each record that
should be there and might not be.
Or print a report with all the dates and scan them for missing dates.
For me this is tedious busywork and I suspect that after a while, especially
if the staff entering the records is half competent that the person checking
for missing records is going to start missing omissions, especially if this
is not a 24/7 operation.

My solution would be to add the records in a batch mode and or make sure a
supervisor was responsible for the entries being done.
 
Back
Top