Disabling And Enabling A Button. PLEASE HELP, VERY IMPORTANT

Mar 14, 2007

Hi, I have a form called Product Details Display Form, which is for Product Details Display table. This form contains a button "Done" which saves everything into the table, or in other words, bounds the unbounded textboxes to the table. Basically, I want this button to be disabled at the begining, when the form loads, and when the user enters ALL the fields, it becomes enabled. Here is the code I have at the moment:
Private Sub Form_DataChange(ByVal Reason As Long)
If Me.Product_Brand = Null Or Me.Product_Code = Null Or Me.Product_Name = Null Or Me.List34 = Null Or Me.Price = Null Or Me.Details = Null Or Me.Discount = Null Or Me.Combo0 = Null Or Me.Combo2 = Null Then
Me.Command36.Enabled = False
Else
Me.Command36.Enabled = True
End If
End Sub

I also have Me.Command36.Enabled = False in the Form-Load. I dont really know if it has to be in Private Sub Form_DataChange or not.

Please help me ASAP

Thanx in Advance

View Replies


ADVERTISEMENT

Disabling/enabling Help!

Mar 10, 2005

Working in the theatreworld, I'm trying to create something which will usefully combine my contacts and also a database of which shows we have done (dates, actors involved etc, etc) and what shows we have bought in.

So far, I have created my form which has the usual fields (name, address and so on) and also a field which asks users to describe what type of contact they are ie. are they an actor, or a director, or a theatre company.
There are also two command buttons, which will either open up another form which lists all the productions they have been in with us over the years (In-house productions), or one that opens up another form which lists what shows each theatre company has brought to us.

I would like to be able to select 'actor' in the category field which will then enable the command button for me to see what productions that person has been in. Or if I selected the 'theatre company' category then the other button becomes enabled.

Can anybody advise me on this please? Alternatively, if this all sounds far too convoluted, then I am open to suggestions!

Many thanks in advance,
Popps

View 1 Replies View Related

Enabling And Disabling Fields...

Nov 28, 2005

hi, there is this form i want to create which uses a drop down list.... i want to be able to auto enable and disable selective fields upon selecting one of the choices.

e.g. in a drop down list containing: choice 1, choice 2 and choice 3

and there are the fields field no. 1, field no. 2 and field no.3


If i select Choice 1 --> field no. 1 get enabled and the other 2 gets disable... so on and so forth....


How do i go about doing this?

View 1 Replies View Related

Enabling/disabling Fields With Check Boxes

May 16, 2005

Hi,

Is it possible to enable and disable fields on a form with another field that is a check box?

i.e. a text box is greyed out until a check box is ticked.

Any help is appreciated,

Cheers,

Phil

View 1 Replies View Related

Enabling/Disabling Fields In Single Records

Jun 27, 2005

Hello,

I've recently been told how to enable/disable fields in a form by ticking/unticking a box. Is there a way that, on a tabulated form, i can only disable/enable the field for the same record as the one the check box is in rather than for every record?

Any help will be greatly appreciated.

Thanks,

Phil

View 2 Replies View Related

Modules & VBA :: Enabling And Disabling One Control On Continuous Form

Mar 4, 2014

Basically I have a continuous form with each record having a textbox and a checkbox. There can only be one checkbox ticked per record but what I want to do is to stop the other checkboxes from being ticked if one is already ticked.

View 2 Replies View Related

Queries :: Enabling / Disabling Fields According To Previous Data Entry

Aug 6, 2013

I need to create a form to enter data from a survey, and ideally some sections of the form would only be completed when the answer to a first question is "yes". How to do this enabling/disabling of fields for data entry?

View 3 Replies View Related

Complete Newbie.please Help With Enabling/disabling Field Based On Combobox Selection

Oct 24, 2006

Hi everyone,


Firstly apologies for posting what is likely to a really simple problem and probably has been explored before. I have been looking through other treads but nothing that I could identify really fits the bill.

Essentially based on choices made against a combo-box, I wish to lock or hide combinations of fields/combo box within the form. Realistically I want to lock rather than hide.

All the fields/combo boxes in the form I want to effect are bound.

I can effectively do this as long as the fields/combo-boxes are unbound, but it seem to fail when they are bound.

Any assistance would be really helpful so thanks in advance.

View 3 Replies View Related

Enabling A Button When A Text Box Changes

Oct 1, 2005

Hi all,

I was just wondering if it is difficult to enable a cmd button when a text box has been filled in. I have a button that allows users to add a file which displays the filepath in a text box. So what I wanted to do was when the path appears in the text box then this will enable the button. I thought that It may have been something like

Private Sub FilePath_Change()
cmdOpen.Enabled = True
End Sub

but as usual i was wrong lol

Anyone got any advice on this , thanks
J

View 1 Replies View Related

Enabling Textboxs With Radio Button

Sep 11, 2006

Hi i have done this before but can not remeber how i did this.

Basically i am doing a report function where users can choose which type of report they want to print- i am decided to use a radio button function so user have to click on the radio button to enable which report they want to view

(see pic) http://img153.imageshack.us/my.php?image=radiobuttonstu8.jpg

Can some1 help me with the code i need to use so when a user clicks on the radio button one combo box is enabled and the other is disabled

Many thanks in advance

View 3 Replies View Related

Enabling A Command Button - Help With Code

Aug 30, 2004

I have two text boxes and a check box - so the user can enter (1) patient weight, (2) patient height and then check whether the patient is male or female. The first two are then used to calculate a Body Mass Index. (simple enough and works OK). What I then want to do is have four command buttons that become visible when the calculation is within a certain range. So - simplistically- if the calculation (calctxtbox) is between 0 and 5 AND the patient is female then the command button called "normal"(Command79) is enabled.
My VB code writing is improving (thanks largely to this forum!) but still very basic - can some-one help please?

Do I put my code in the "after update" event of the calctxtbox?

Private Sub calctxtbox_AfterUpdate()
If calctxtbox > 0 (How do I say and <5) and then how do I say Female =Yes Then
Command79.Enabled = True
End Sub
Am I close?
Also can you enable labels and text boxes or just buttons.

View 4 Replies View Related

Disabling Command Button

Apr 14, 2005

Im new to this, and a beginner at database design, but I am currently stuck on disabling a command button.

Basically what happens is the form is loaded and there are two buttons (save and undo) both disabled:

Private Sub Form_Current()
Me!cmdSaveAddAd.Enabled = False
Me!cmdCancelAddNewAd.Enabled = False
End Sub

once a text box has been filled in the next occurance happens:

Private Sub Form_Dirty(Cancel As Integer)
Me!cmdCancelAddNewAd.Enabled = True
Me!cmdSaveAddAd.Enabled = True
End Sub

which enables both buttons. but the problem is when a user clicks the undo button i want both buttons to be disabled again, i cannot get the undo button disabled, the save button was easy enough:

Private Sub cmdCancelAddNewAd_Click()
DoCmd.RunCommand acCmdUndo
Me!cmdSaveAddAd.Enabled = False
End Sub

but if i put (Me!cmdCancelAddNewAd.Enabled = false) i get an error message saying 'you cannot disable a control that is in focus'.

View 1 Replies View Related

Disabling A Command Button

Sep 4, 2004

I'm designing a database to do invoices.

Items_sub is a continuous form.

For an item being returned I've made a command button that brings up a "return" form which is related to the Items form with a one-one relationship, (so the two primary keys are linked). Obviously an item can only be returned once, (logically and because of duplicate primary keys), so i'd like to disable the command button once it's been clicked. At the moment i have:

Private Sub cmdReturn_Click()
Me.cmdReturn.Enabled = False
End Sub

This doesn't work because it disables the button for all the records (It's in a continuous form).

Any help is greatly appreciated. Thanks in advance
Joe

View 4 Replies View Related

Disabling The Close Button On A Form

Dec 21, 2006

I have a form which I want to disable the close button. On the properties of the form I set Close Button option to 'NO'. When I open the form the form close button is disable, but as soon as I maximse this screen, the close button becomes enabled again. Any Ideas as to why this is happening and how I can disable this button comlpetely on this form?

View 2 Replies View Related

Modules & VBA :: Disabling Option Group If A Button Is Pressed

Jun 16, 2014

I have an option group with 2 buttons in it, yes and no. It is set to default to No, but if someone hits Yes I want it to enable or turn on the next option group. Would just simply changing visible status disable it? Because I have a series of codes set up based on the second option group which read as:

Code:
Private Sub NumberOfAdditionalSites_Option1_GotFocus()
Me.AdditionalSitesLabel1.Visible = True
Me.AdditionalSitesText1.Visible = True
End Sub

[Code] .....

I do not want these to be visible if the initial option group is still set to no.

View 4 Replies View Related

Forms :: Disabling Command Button If Record / Records Not Saved?

Dec 19, 2013

Is there a way to disable my print report button if the user has not hit the save button ???? and maybe display a msg box?

attached a snippit of my form.

View 5 Replies View Related

Disabling "X" Closing Button

Sep 17, 2005

I was reading some old posts and came across one that states, using the "X" closing button to close the database could cause errors in the database. How could I disable this "X" closing button for the database?

View 3 Replies View Related

BE/FE Security *Important*

Mar 12, 2006

i have an access application in fe/be environment. I have put the BE in a shared forlder on the network.

Now the problem is that the shared folder where the BE is stored, has full read/write access. And this folder is visible to all users on the network from their network neighbourhood or through the mapped metwork drive.

So the problems are:
1) The shared folder has read/write access, so anyone can delete the BE mdb file. <<<<< main problem >>>>>

2) As this folder is visible to even those users who do not use this softaware, anyone can see the data.


We are using winxp and win98 on our network.
What can i do to secure the BE mdb file?

View 12 Replies View Related

2 Important Questions

Nov 13, 2005

Hello,

>> How can i get all the results if no input parameter is put in the query e.g. if i have A,B,C and need to get all results, only A, only B and only C?

>> How can i block 1 cell and only acess it if the last cell have a correct value?

Thanks in advance,
Kobee

View 3 Replies View Related

IMPORTANT - Help With Access

Jan 16, 2005

I was wondering if anyone could help me. I am designing a database for a bowling alley as a project and I am wanting to know if there is a way of doing a search which will bring up all lanes which are unbooked. I have got a search which brings up all lanes booked in ascending order but need a more detailed search. Hope someone can help and if this does not make muc sense please contact me.
Thanks!!!

View 2 Replies View Related

Hiding The Important Bits

May 9, 2005

Hi,

I've developed my little database and it works a treat... now I want other people to be able to access it input info via forms (add data), and see reports and run searchs etc... all of which is done through a central switchboard menu.

What I dont want is other users getting into the setup of it all - basically i just want to hide the background workings, relationships, queries etc so nothing can be messed up...

What can i do, and how?!

bear in mind, i still want to be able to have full access myself.

Cheers

amx

View 3 Replies View Related

Simple Yet Important PROBLEM

Jun 10, 2005

I currently have a database and I would like to add in page numbers. I tried the built in functions but they did not work and they are not exactly what I am looking for. I want my page number to look like this:
"1 out of 12 records for MICROSOFT"
So I need the counter to know how many records exist for a specific client and keep track of which one of those records are being viewed. Can anyone help?

View 1 Replies View Related

Important Notice To Vista Users!

May 28, 2007

Important notice from Micro$oft's Knowledge Base:

When you open or are using a Microsoft Office Access database on a computer that is running Windows Vista, you may encounter one or more of the following issues:
• Access appears to stop responding.
• Access responds very slowly.
• Access exits unexpectedly or crashes.

For the complete article and possible work arounds goto:

http://support.microsoft.com/?kbid=935370

View 9 Replies View Related

Text Color For Urgent Or Important Items

Jul 2, 2012

How do I set the text color in one field as Black for regular records & a different color for Special records?

View 1 Replies View Related

Need Some Important Help To Get Added/modified Rows From Access Tables.

May 23, 2007

Hi,
I have a 3rd party desktop application to manage inventory. The data will be stored in local MS Access database. I want to sync any changes (insert, update or delete) made to this database to remote MS Sql server immediately or in batches using a scheduler.

Is there any method to know the changed rows in an MS Access table after x time. I mean I want to get all the rows in an Access table that have been added or modified after a particular date and time (say "05-23-2007 10:15:00") without using a user defined date time column in that table.

If i can do the above operation, i will write queries to get the added or modified rows and update remote server in batches.

Thanks and Best Regards,
Anz

View 1 Replies View Related

Enabling Options

Jan 17, 2008

I'm by no means an expert when it comes to using access and its many controls that are avaliable to use on forms. Thats why I've come here to seek your help.

I have a database that has been created by someone who has now left the company and it needs a little work done to it.

The ideal thing we would like to get working on form, is that we would like a number of options to be greyed out and only accessable when another option is ticked.

I'm not sure how to group these options together, nor an I sure how make them active only when an specific tick box is ticked. Any help would greatly appreciated on this matter.

Thanks for your time and patience.

Menes.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved