![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Need to make a command button enter a specific word into a field
Here is my scenario. I have a database that is being used for entering
customer appointments and information. Instead of allowing my (trusting) employees to delete an entry, I want a button that simply enters the word "Cancelled" into the InvoiceNumber Field. I track open customers by determining if this field is Null or not. Once an invoice is entered I know the job is done. Not sure if I should be using a Macro or a Query. Or if I should just be using an expression. Your help is appreciated |
|
|||
|
Re: Need to make a command button enter a specific word into a field
On Thu, 14 Aug 2008 11:20:06 -0700, Kevin
<Kevin@discussions.microsoft.com> wrote: >Here is my scenario. I have a database that is being used for entering >customer appointments and information. Instead of allowing my (trusting) >employees to delete an entry, I want a button that simply enters the word >"Cancelled" into the InvoiceNumber Field. One way... Make a new command button, tell it to do a form operation, refresh Go to the on click event and edit the procedure Above the generated DoCmd... line enter Me.InvoiceNumber = "Cancelled" Save and test |
|
|||
|
Re: Need to make a command button enter a specific word into a field
Hi Kevin,
rather than putting information where it does not belong, consider another field to track the status. I often put this field into tables: IsActive, yes/no, DefaultValue=True then, you can put this code on your command button: '~~~~~~~~~~ me.IsActive = false '~~~~~~~~~~ If you have more than one kind of status (maybe you distinguish, for instance, between Canceled by Customer, or Canceled because items could not be acquired, or ... In that case, it would be good to have a table for InvoiceStatus and use a numeric foreign key to relate to that in your Invoice table. Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day :) * Kevin wrote: > Here is my scenario. I have a database that is being used for entering > customer appointments and information. Instead of allowing my (trusting) > employees to delete an entry, I want a button that simply enters the word > "Cancelled" into the InvoiceNumber Field. > > I track open customers by determining if this field is Null or not. Once an > invoice is entered I know the job is done. > > Not sure if I should be using a Macro or a Query. Or if I should just be > using an expression. > > Your help is appreciated |
|
|||
|
Re: Need to make a command button enter a specific word into a fie
I appreciate the help from both of you. I went with the command button using
Me.InvoiceNumber = "Cancelled" This is because the way I have designed my database so far is that as long as the InvoiceNumber is Null, it is considered open. I didn't want to have to reconfigure all my forms to use an isactive command. |
|
|||
|
Re: Need to make a command button enter a specific word into a fie
you're welcome, Kevin ;)
Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day :) * Kevin wrote: > I appreciate the help from both of you. I went with the command button using > Me.InvoiceNumber = "Cancelled" > > This is because the way I have designed my database so far is that as long > as the InvoiceNumber is Null, it is considered open. I didn't want to have to > reconfigure all my forms to use an isactive command. |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|