oi Bob!!

Sunday, March 7, 2004, 2:41:17 PM, you wrote:

set  a session variable at the bottom of the page...or on the action page.. do a check for it on the
form page... if it's there... don't submit....

BH> Using CF 5 and Access for a member directory application...

BH> When the application Administrator adds a new member record, Access
BH> gives that record a unique number (auto-increment field). I then use a
BH> query of the database to learn what that number is using
BH> max(MemberID).  I then use whatever MemberID is returned to run
BH> another query in order to  display the details of the just entered
BH> record as a confirmation to Administrator.

BH> All that occurs within one template and it all works fine. The problem
BH> is if the Administrator hits refresh on their browser.  The browser
BH> refreshes the exact same information to the Administrator BUT it also
BH> re-inserts the exact same data with a new MemberID.

BH> How do I stop that attempt to re-run the insert query when all that's
BH> occurring is a browser refresh?

BH> Taking this one step further, I know I can prevent this from occurring
BH> by making a record field unique (such as email or username).  I can
BH> then check to make sure a new record isn't being added which has the
BH> same email or username of an existing record and, if it does, return
BH> an error message.

BH> However, that doesn't really solve the problem fully because when I do
BH> that, the template still attempts to re-processes the record insertion
BH> but this time returns the error message "That email address is already
BH> taken".  That prevents entries of duplicate records, but the message
BH> is confusing to the Administrator.

BH> I'd simply like, on browser refresh, to have the data re-displayed
BH> without the template attempting to re-insert the record.  Is my
BH> problem simply that I have the record insert and record display code
BH> in the same template?

BH> How do others handle this situation?  Thanks in advance.

BH> -------------
BH> Regards,
BH> Bob Haroche
BH> O n P o i n t  S o l u t i o n s
BH> www.OnPointSolutions.com

BH>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to