Jana Posted May 26, 2004 Posted May 26, 2004 In my Time database a Login script, which is set to run when the file opens every day, verifies a user, finds their existing records and helps navigates based on the Status(CurrentMessageChoice). I want to be able to have the script also determine if a time record already exists for the current date, and then go to that record if the user chooses to edit. If one doesn't exist, a new record for the current date is created. I am currently getting duplicate records for the same date with the script (for example when the user has to restart their computer in a day). I've attached pdf's off my Login script and Entry Prompt subscript. Can anyone help me see where I've gone astray with my logic? Thanks and Thanks.
-Queue- Posted May 26, 2004 Posted May 26, 2004 I see no attachment, but I think this might be what you're looking for. Create a relationship from a global date field to the field that contains the date of service (I'll call it rel). Then you can set the global with today's date and test for related records. Set Field [gDate, Status(CurrentDate)] Exit Record/Request If [isEmpty(rel::serial)] New Record/Request Else Go to Related Record [show, rel] End If
Recommended Posts
This topic is 7834 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now