data entry

  • Thread starter Thread starter jomara via AccessMonster.com
  • Start date Start date
J

jomara via AccessMonster.com

I have a form for salespeople to enter sales right now i have it set for no
edits. Seems people dont know how to enter data because 1 out of 3 are wrong
i would like to make the form editable till the next day
 
I have a form for salespeople to enter sales right now i have it set for no
edits. Seems people dont know how to enter data because 1 out of 3 are wrong
i would like to make the form editable till the next day

I'm sorry, but this makes no sense.

If they are making 33% errors, how does making the form editable for
one day help? I'd think it would make things WORSE, since they will
still make errors and then not be able to correct them on a later
date.

Or if the form is set to disallow edits, how are they making mistakes
at all?

What kind of errors are they making? Errors that could be detected by
form validation, or just typing $316 when they meant to type $361?


John W. Vinson[MVP]
 
From an earlier post on the same subject:

"i would like to make the form editable till the next day or untill the
accounting dept runs their sales query"

He/she apparently wants to leave the records open for editing until the
accounting report is run, locking them at that time.

My opinion: Sometimes you just have to rap knuckles! 33% incorrect data being
entered means somebodies should be looking for work!
 
The errors are being caught almost immediatly they may get 3 sales from the
same person and enter them at the same time mixing up the info. the problem
now is once they finish the first sale it cant be changed when they enter
the second one they realize the first mistake and cant change it. I was
hoping if i let them edit for the day it would cut down on the errors
 
OK, jomara, here's what you can do.

1) Add a field called CraetionDate to your underlying table. Make it datatype
Date/Time, format General Date

2) If your form is based on a query, go into Design View for the query and
add the new field to the query (this is so it will show up in your Field List
for the form)

3) Add a text box to the form bound to this new field.

4) In the Properties Box for the text box set Visible to NO

5) Add a label called LockedWarning to your form. Have the text say something
like "This record is closed and cannot be edited!"

Now add this code:

Private Sub Form_Current()
If Me.NewRecord Then
Me.CreationDate.Value = Now() 'This sets the creation date/time for
the record
End If

If DateDiff("h", CreationDate, Now) > 24 Then 'Checks time lapse since
record creation
Me.AllowEdits = False 'If record is 24 hrs+ old it's locked
LockedWarning.Visible = True
Else: Me.AllowEdits = True 'If less than 24 hrs old it can be edited
LockedWarning.Visible = False
End If

End Sub

I think I've got everything here. Go an appointmet and gotta go. I'll check
back later to see if yu have any problems!
 
If you copy and paste the above code into the VB Editor be sure that

'This sets the creation date/time for
the record

appears in your code as

'This sets the creation date/time for the record

and

'Checks time lapse since
record creation

appears as

'Checks time lapse since record creation

The Monster's text editor split them for the posting and they'll throw an
error if they're not on one line each!

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top