By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,301 Members | 1,999 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,301 IT Pros & Developers. It's quick & easy.

Form Closes and Adds Record

P: n/a
I have a form that opens. On this form there is information along with a
button that opens a payment form.

The payment form opens and I enter a payment type, cash check or charge,
a payment number like the cc number or check number, and the amount of
the payment.

I have a button on this form that when clicked adds the payment to a
table via a sql statement in vba which works fine.

My problem is when I click my close button it adds a second payment
record using the same information that I just added. I can not figure
our how to get the form to close and NOT add the second record.

It is driving me nuts!! How do I get the form to close and NOT add
another payment line??? The only time I want a payment line added is
when I click the add button.

Any help would be greatly welcomed!!

Michael Charney
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
DFS
Two possibilities I can think of:

1) the Close event of the payment form also adds the payment record
2) the form is bound to a table and when you enter the data it adds a
payment record automatically

"Nothing" <me@you.com> wrote in message
news:3f*********************@news.frii.net...
I have a form that opens. On this form there is information along with a
button that opens a payment form.

The payment form opens and I enter a payment type, cash check or charge,
a payment number like the cc number or check number, and the amount of
the payment.

I have a button on this form that when clicked adds the payment to a
table via a sql statement in vba which works fine.

My problem is when I click my close button it adds a second payment
record using the same information that I just added. I can not figure
our how to get the form to close and NOT add the second record.

It is driving me nuts!! How do I get the form to close and NOT add
another payment line??? The only time I want a payment line added is
when I click the add button.

Any help would be greatly welcomed!!

Michael Charney
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #2

P: n/a
The form is bound to a table.

So how do I get it to NOT add a record when I close the form?

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3

P: n/a
Are you adding a default or aytomatic payment date to a field, in which case
there will appear to be information for a new record.

Phil
"Nothing" <me@you.com> wrote in message
news:3f*********************@news.frii.net...
The form is bound to a table.

So how do I get it to NOT add a record when I close the form?

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #4

P: n/a
There are 5 fields in the form. Two of them have information assigned to
them when the form is opened. The otehr 3 are added by the user.

How to do I cancel the record add event when the form closes?

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #5

P: n/a
DFS
Nothing,

If the form is bound to a table it will usually open to the first record in
the table, unless the form is set for Data Entry, in which case it opens to
a new record. That sounds like what's happening.

Either unbind the form from the table and use your 'Add Payment' button as
usual, or leave it bound and delete the 'Add Payment' button and recognize
when you enter the data you're entering a new payment record.

"Nothing" <me@you.com> wrote in message
news:3f*********************@news.frii.net...
The form is bound to a table.

So how do I get it to NOT add a record when I close the form?

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Nov 12 '05 #6

P: n/a
Thanks. I cam to the realization that I should not have bound the form
to the table. I unbound the form and it works exactly as I thought it
should.

Thanks for all the help.

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.