Forms :: Gray-out / Disable Text Fields By Checking A Text Box

Nov 21, 2013

how can i disable a textfield or two in a form when the textbox is unchecked also how do i add a default value for it while the textbox itself is disabled, can i get away with it by adding a default value on the textbox?

View Replies


ADVERTISEMENT

Modules & VBA :: Disable Button When Text / Combo Fields Are Null

Aug 5, 2013

On a form, I want to disable the save button, 'cmdSave' whilst the form's mandatory fields have been left blank.

I've put in a smart tag, called, 'Req' against each required field and have used the following code on the forms current event.

Code:
Private Sub Form_Current()
Dim ctl As Control
For Each ctl In Me.Controls
If ctl.ControlType = acTextBox Or ctl.ControlType = acComboBox Or ctl.ControlType = acListBox Then

[Code] ....

The save button is disabled, but it won't enable again after each field has data entered against it.

I also have this code in the AfterUpdate event in each required field:

Code:
Private Sub cboErrorID_AfterUpdate()
Call Form_Current
End Sub

View 13 Replies View Related

Forms :: Some Fields Have Gray Font Instead Of Black

May 7, 2013

I have a form that some fields have gray font instead of black. All of the properties seem to be the same as the other fields. The issue has to do with the 'Manage Sales Order' Form in the 'Products' Database.

Customer ID
Payment Type

View 8 Replies View Related

Modules & VBA :: Spell Checking A Text Box On A Form

Jul 1, 2015

I'm trying to get a spell check to work on a text box on a form. i've got it popping the spell check window after the box has been updated but i'd prefer it to just highlight the errors in red, rather than pop the spell check box. another problem i'm having is when it's finished spell checking the box it moves the form back to the first record. this is the code i'm using.

Code:

Private Sub txt_notes_AfterUpdate()
If Len(Me!txt_notes & "") > 0 Then
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSpelling
DoCmd.SetWarnings True
Else
Exit Sub
End If
End Sub

View 6 Replies View Related

Disable Edit In Text Box

Dec 11, 2005

I would like to disable editing in a text box once the information has been entered initially, but would like to be able to turn editing back on by double clicking the text box label. This is to be used for a database I'm creating for truck fleet management. Any ideas??

View 4 Replies View Related

Modules & VBA :: Disable And Clear Text Box?

May 23, 2015

using Ms access 2010.I have two text boxes where depending on what is entered on the first the 2nd disabled.that works fine but if I make a mistake and enters a value on the 2nd while it is enabled and return back to the first and enters a value which disable the 2nd, it disable it ok but keeps the value and even save it to the table.

Private Sub q300_AfterUpdate()
If Me.q300 = "1" Then
Me.q300_1.Text = ""
Me.q300_1.Enabled = False
Me.q301.SetFocus
Else
Me.q300_1.Enabled = True
End If
End Sub

View 9 Replies View Related

Cannot Disable Source Checking

Oct 14, 2012

Even with autocorrect disabled I still get Expr#: in all my queries when I import them, how can I stop this?

(there are 500 or so queries so must be a bulk method and many of them are based on temp tables created during running so getting all the source tables is not an option)...

View 5 Replies View Related

Forms :: How To Populate Bound Text Field With Text From A Unbound Text Field

Mar 22, 2014

I have 4 fields that are unbound on a form. img1 img2 img3 img4..When these are entered they are all combined and autofill another unbound textbox = imagename.. what i would like to do is from this unbound textbox 'imagename' ..i would like to populate a textbox that IS bound called FileName

[Event Procedure]
Private Sub imagename_Click()
Me.imagename = Me.FileName
End Sub

View 4 Replies View Related

Forms :: Compare 2 Text Fields?

Aug 27, 2013

Text fields name:

Password
confirmpassword

Trying to achieve:

on "After update" event for Confirm password a code needs to find if both Passoword and confirmpassword are having the exact character (Case sensitive).

Below code doesn't recognize the Case. It allows as long as both words are same:

Dim StrString1, strString2 As String
StrString1 = Password
srtString2 = ConfirmPassword

[Code].....

View 8 Replies View Related

Forms :: Labels And Text Fields

May 28, 2015

I have a problem with the connection between the labels and fields in designing my form.Is there a command do eliminate the association between the two? If not I was thinking if there is a problem to delete the labels and make new ones but by doing this Access (2010) says the label is unassociated.

View 6 Replies View Related

Forms :: All Text Fields Are Borderless

Mar 6, 2013

Quick question with respect to Ms-access Forms.I have a few forms on my database. I have created a button and set it's click event to open another form in addmode, but when the form opens all my field borders ar missing. I have attached a screen shot of the issue I am facing. All the text fields are border-less I dont know why.

View 2 Replies View Related

Forms :: Combine 2 Fields And Text

Jun 8, 2015

I wanted to combine 2 fields and a text in one text field on the access form.I have a field called "SentDateTime" and a field "Comment" I wanted to create it like this: MSD Message sent on 24/12/2014..I tried this formula in a unbound text field and it did not work:

Code:
=[Comment] & " " & "message sent on" & " " &[SentDateTime]

Code:
=J2& " " & "message sent on" & " " &TEXT(A2,"dd/mm/yyyy")

View 8 Replies View Related

Forms :: Text Box To Search Through All Fields In Tables

Aug 12, 2014

I need making a search function for a form. I have a form with details about telephone counselors and want to be able to place a text box at the top that allows me to search through all the fields in the tables that the form relates to or displays.

View 13 Replies View Related

Forms :: Text ForeColor Of ComboBox Fields

Aug 27, 2013

I am working on a database project using Access 2010 and encounter some ComboBox text color problem,

The form has a ComboBox that displays the Supplier Name. The Combo's source control is Supplier ID in the Products table which joints the Supplier Table containing the Supplier Name. To display the Supplier Name only, I use a column count of 2 (for VendorID and VendorName) and column width of 0";2" so as to hide the SupplierID.

VBA is used to dynamically change the ForeColor and BackColor (via the Control Property ".ForeColor" etc) of the text in the ComboBox and TextBox. This works well for all TextBoxes and the ComboBoxes with direct data from the Products Table. However, for the ComboBox of VendorName, the BackColor can change but the ForeColor always remains as black. I have tried using the Format query such as "[White];@;[White];@" which works on the TextBox and other ComboBox (with direct field data from table), but the situation remains the same on this ComboBox which uses join-table reference via the VendorID.

View 3 Replies View Related

Forms :: Short Text Fields With Scroll Buttons?

Jul 7, 2014

Most my short text fields on my form are normal, but some have scroll buttons like a memo box and it's annoying, especially because the user can't jump to the next field by pressing return.

How do I make them normal?

View 10 Replies View Related

Forms :: Unable To Filter Text In Foreign Key Fields

Mar 8, 2014

In a nutshell, I have a form where the 'Record Source' is a table titled 't_02_0_Assets'. I have several fields in the table that have foreign key references that utilize the Lookup Combo Box display control to allow users to select from a drop down list in the form.

The issue I am having is that I can't filter the text in the foreign key fields (only the ID's ).

My attempted solution was to create a control on the form (text box) and bind it to each of the foreign key ID's using the DLookUp function and then reference this control in the filter code.

My question is... how do I reference this DLookUp textbox in my filter VbCode?

I have attached a '.jpg' image of various aspects of the form including the filter code on the 'On Change' event.

View 1 Replies View Related

Forms :: How To Make Text Fields Or Labels Curved

Apr 16, 2015

Is there a way to make text fields or text labels curved?

Is this even possible?

View 1 Replies View Related

Forms :: Display Row Text From Subform Column In Unbound Text Box Of Main Form

Jan 6, 2014

My database has Main form and a Sub form. On main form i place one unbound text box named investigations. In subform of which datasheet there is a column named TestCode. I want unbound text box (Investigations) to display row values which selected in a column (TestCode) of subform.for example:Investigation field should display "CBC,HB,ALP".

View 5 Replies View Related

Forms :: Change Text Color On A Form If Text In Field Contain Certain Word

Jul 12, 2013

I have a Form Display Data in my Access Database, which is working really well. However, users was asking if there is a way we can make Font Color Could/would change if The text in A field or Any field in my display form contained the word "SAD or MAD". Is there code for such thing in display form?..

View 3 Replies View Related

Forms :: Text Box Search On ID And Populate Other Text Boxes In Same Form

Nov 12, 2013

I am trying to search on EmployeeID field and populate corresponding data like EmployeeName, EmployeePay in other text boxes in the same box .

In my Unbound Form I have three unbound Text Boxes and one Command button:

txtEmpID
txtEmpName
txtEmpPay
cmdFind

In my table EMPLOYEE i have three fields

EmpID -- Autonumber
EmpName -- Text
EmpPay -- Text

View 2 Replies View Related

Forms :: Text Prompt In Fields When Bound To A Numeric Field

Sep 12, 2014

I have several combo box fields in a bound form where they are selecting values from a list (values stored in a separate table) and then loading a number into the bound table field when selected.

How can I put a text prompt in these fields when loading the form which gets removed when focused and of course is not permitted to attempt a save into the bound numeric fields? I've done quite a bit of searching but can only find materials about doing this on bound text fields. I've also seen solutions using Nz which don't seem to work.

View 4 Replies View Related

Forms :: Checking For Required Fields Before Saving Record

Aug 25, 2014

I have a transaction form and there is at least two fields I need to make sure have been entered before the record is saved.

I have no problem with text or numeric fields but I can't seem to be able to check the contents of a drop down field.

What is the best method to use to make sure a drop down has been selected by the user and contains a value.

I have temporarily used a default value in the drop down but that's not really what I want.

View 3 Replies View Related

Forms :: Text Box Search To Populate Other Text Boxes?

May 10, 2015

I have a form with two text boxes and a button. I want to be able to type a value into the first Text box click the button and the second text box to be filled with the value which is stored in the Table.

The first Textbox is called barTxt, The second Textbox is called CustTxt The button is called SearchBtn and the Table is called BookInTable. I have been trying to use the code.

Code:

Private Sub SearchBtn_Click()
DoCmd.FindRecord Me.BarTxt.Value, , True, , True
CustTxt.Value = "SELECT BookInTable.Customer FROM BookInTable " & _
" WHERE Customer = """ & Nz(Me.BarTxt) & """" & _
" ORDER BY Customer"
End Sub

This however instead of displaying the Value for customer which is stored in the BookInTable. Displays The code SELECT BookInTable.Customer FROMBookInTable " & _ " WHERE Customer = """ & Nz(Me.BarTxt) & """" & _ " ORDER BY Customer"

View 6 Replies View Related

Forms :: Save Values Entered Into Unbound Text Boxes To Fields In Table

Mar 6, 2013

how can i to save the values entered into unbound text boxes to fields in table

View 2 Replies View Related

Forms :: DLookup - Using Two Fields (number And Drop Down Text) To Query Table For Data

May 29, 2015

DLookup function. (this is for a stamp collection database).

On my form ("InventoryInput") I have a text box called "Catalog" for a numeric entry and a text combo box for selecting a "Country" in drop down list.

I want to query a table called "CatNameList" to get the "StampName" of the item (based on the entries of Catalog and Country) and populate that name in the text box. The fields in this table are called "StampName", "CatNumb" & "CName" respectively.

I have successfully placed the following expression in the control source of that textbox and able to populate the StampName I need based solely on the catalog number alone.

That express is :
=DLookUp("StampName", "CatNameList", "CatNumb = Form![Catalog]")

So it will populate the "StampName" data to match the "Catalog" number entry just fine.

However, I need to add a second layer to incorporate the Country.

Example : There is a catalog "1" for "USA", and a catalog "1" for "Canada" but both have different "StampName".

I have been attempting to get that second piece added with no success. Here is the expression I have been trying to get to work :

=DLookUp("StampName", "CatNameList", "[CatNumb] = " & [Catalog] & " And CName = '" & [Country] & "'")

Right now, the text box is just blank with the above expression. I thought it may be because there was no match found, but I have triple checked to ensure I have the spelling correct on the country name in both places.

Basically, I just need the dlookup to take the "catalog" and "country" off the form and match it to the "CatNameList" table fields of "CatNumb" and "CName" to give me "StampName" field back on the form.

View 4 Replies View Related

Forms :: Enter Text In Unbound Text Box

May 14, 2013

I want to enter text in an unbound text box and for it to be repeated in another on the same form.

View 6 Replies View Related







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