How can I use one command button only?

vbnt

Registered User.
Local time
Today, 19:48
Joined
Sep 28, 2006
Messages
20
Hi all

Can any one correct my attached program to make it works with one command button only please?

Using two buttons make conflict.

Any help will be highly appreciated.

Thank you

vbnt
 

Attachments

Just curious why you are using an unbound form instead of a bound form. You could save yourself a bunch of coding if you use bound forms.
 
Follow up

You are right boblarson.

But I created this code to generate number like auto number to make track my work the way I need.
Using auto number makes a lot of problem , specially when I open the form to add new case, when I changed my mind and I close the form and reopen it again will give me new number while the previous number has no record , that is the main reason I am using that code to try control the number .

I hope that is clear to you .

Can you please adjust the program or use your idea and let me see how it works.

I hope that will solve my problem.
I am waiting for your great support .

Thank you
 
Hopefully someone else can get to it before I'll be able to. I have to go to bed (it's after midnight here) and then I wouldn't be able to get to it until after work tomorrow which would put it at about 18 hours away.
 
I hope so, anyhow , have a nice sleep.
Thank you
 
still I am follow up, I hope some one can help me soon.
Any help will be highly appreciated.

Thank you
 
Sorry it took so long to get back to you. I didn't have time last night but here is a working copy (using a BOUND form and no autonumber but the same DMAX and yet still able to cancel it and not waste a number.
 

Attachments

Follow up

It is a great idea, but not working well,
Just try it with out any record in the maindata table.
Anyhow, thanks a lot for your efforts

Regards,
vbnt
 
When you say, "not working well" can you be a little more specific as to what is happening? I tried adding records and it worked fine for me. Maybe I need a little more info as to what you consider not working.
 
Follow up

1- Just try to delete all records in the maindata table.
Then open newcase form , you will see this error. The command or action recordsgotonew’ isn’t available now.

2. when I fill all text boxes and go to subform to fill I go error . Index or primary key cannot contain a Null value.

What I really seeking for is .
1. keep all tables empty
2. open newcase form , this form should start with ordered number one.
3. fill all text boxes and fill subform, last click save button.
4. now the ordered must be number two and so on.

Hope that clear to you.

Thank you
vbnt
 

Users who are viewing this thread

Back
Top Bottom