Enabling Text Box Based On Data In Other Text Box

Aug 16, 2006

Hi All

Looking for some quick help
I have a form made from the data in a table and what I would like to do is

if the data in one txt box = 1 than only the data1 text box would be available for edit,

if the data in one txt box = 2 than only the data2 text box would be available for edit,

and so on

below is the code I have entered on the on open event of the form

Private Sub Form_Open(Cancel As Integer)

If DataTypes = 1 Then
Data1.Enabled = True
Else
Data1.Enabled = False
End If

If DataTypes = 2 Then
Data2.Enabled = True
Else
Data2.Enabled = False
End If

If DataTypes = 3 Then
Data3.Enabled = True
Else
Data3.Enabled = False
End If
End Sub

Any help would be fantastic

Thanks
danson

View Replies


ADVERTISEMENT

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

Show Text Box In A Form Based On Character Within A String In Another Text Box

Dec 21, 2012

I have a form where I want a textbox [txtMaxOrdLimit] to be visible only if another text box on the same form [PaNumber] contains the letter D in the string. This is the code I have on the forms On Current property but I'm missing something because textbox [txtMaxOrdLimit] doesn't show on the form at all.

If Me.PaNumber = "*D" Then
Me.txtMaxOrdLimit.Visible = True
Else
Me.txtMaxOrdLimit.Visible = False
End If

View 3 Replies View Related

Limit Text Entry Based On Another Text Box

Sep 8, 2004

Hi,

I'd like to know if this is possible and if so, how to do it.

I have a couple of text fields, let's say text1 and text2. I would like the following functionality:

if text1 = "somevalue"
then allow entry into text2
else disable entry into text2

Any help would be much appreciated.

Thanks.

View 2 Replies View Related

Forms :: Getting Data From Table Based On Text Boxes

May 3, 2014

my problem seems to be very familiar to the one in this thread :

[URL]...

Basically I have a list of tables in one combo box. I want the user to select which table. ( The tables are stock information, each table for each different day of the stockmarket)

Then they select the Stock they want to look at. ( These are the same in all the tables obviously, so it is the same in the drop down box)

NOW, the bit i'm struggling with. Is for a textbox below to show the value found IN the table name selected, with the stock selected. How would i do this in SQL, or VBA with SQL.

View 1 Replies View Related

Modules & VBA :: Pasting CSV Data Into Text Box And Copying It To A Series Of Text Boxes

May 13, 2014

I have a form on which there is a series of text box controls relating to different frequencies. At the moment I enter a value in to each of these manually.

However, I would like to have an unbound text box where I can paste in all the values (6 or 8 of them) from excel and then press a button and they would be copied in to the individual boxes.

So far I have my design:

I'm not sure where to start with regard to the code as I don't know how to handle delimited text - is it column delimited in excel?

I imagine some sort of loop, such as a do until will be required but again not sure.

View 2 Replies View Related

Forms :: Text Box Based Off Another Text Box

Apr 11, 2014

Is it possible to have the value in a text box be set automatically based on the value in another textbox?For example, Textbox Gender is Male, so Textbox Reference is Male.

Code:

IFF Me.Gender = "Male" Then
Me.Reference = "Male" And
Me.ID = "ea13-02c"
Else If
Me.Gender = "Female"
Me.Reference = "Female" And
Me.ID = "ea13-01c"
End If

View 1 Replies View Related

How To Have Text And Not Numbers In Text Data Type

Jan 13, 2006

I was wondering if there is a way of only allowing text in a text field - we need to do this for validation purposes when inporting a text file into a database. I have tried input mask but this only checks when entering new data - I have tried to use validation rule like"???????" however this means that there has to be 7 letters in each field and this is not the case. - the field is for town and a couple of the records in this field have numbers at the end which are incorrect that we want the database to reject :eek:

View 1 Replies View Related

Enabling Textboxes Based On Combo Box Selection

Nov 8, 2006

Hi all,

Is there any way of enabling/disabling a number of text boxes/checkboxes, based on a combo box selection, for example:

Combo Box 1: Airport Selection
Combo Box 2: Customer Selection

Once the user has selected the customer, based on the airport selection there will be about 10 text boxes and a few checkboxes that I'd like to allow or "ghost" depending on whether we are contracted to carry out work for that customer.

Any help would be appreciated.

thanks, Graeme

View 2 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

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

Text Box Based On Combo

Dec 3, 2006

I have searched and looked for this throughout the forum but can't find it.
I have a simple text box which I want to populate based on a combo box. The combo needs to display the table's field name and the text box needs to display the record. Is this possible?
Cheers,
Rene

View 3 Replies View Related

Text Return Based On GPA

Nov 10, 2004

Dear All:

Thank you for all you help with the above title. Your suggestions were all implemented.

Code:
Private Sub GPA_AfterUpdate()
If DIVISION = GRADUATE Then 'Honors field is empty
HONORS = ""
End If
If UNDERGRADUATE = True Then 'Apply appropriate honors
End If
If GPA < 3.2 Then
HONORS = ""
ElseIf GPA >= 3.2 And GPA < 3.5 Then
HONORS = "CUM LAUDE"
ElseIf GPA >= 3.5 And GPA < 3.8 Then
HONORS = "MAGNA CUM LAUDE"
ElseIf GPA >= 3.8 Then
HONORS = "SUMMA CUM LAUDE"
End If
End Sub

Here is the issue: Form created with with a combo box called "DIVISION."The choices of the combo box are "GRADUATE" AND "UNDERGRADUATE." There is a text box called "GPA", where a gpa is entered. then, there is an "Honors" field. When a gpa is entered, the honors box returns the appropriate message.

When graduate is selected from the combobox, the honors box should be empty. (That part does not work.) When undergraduate is selected from the combo box, it works.

Please help,

Dion

View 5 Replies View Related

Using Rich Text Instead Of Normal Text In A Text Box?

May 24, 2012

In my form's text box I have noticed that I can;t write paragraphs ie use the TAB key to start a new line. If I use rich text I assume this will be possible. But are there any disadvantages to using rich text?

View 1 Replies View Related

Query Based On The Text You Click?

Jun 12, 2007

Hello

I'm trying to set-up a database that will allow the user to navigate around by clicking but having a bit of trouble.

I was wondering if there is anyway to capture the text that you click (if you make it a hyperlink or something) so that you can use it as the parameter in a query or something?

Any help would be absolutely fantastic.
Thanks.

Richard

View 8 Replies View Related

Calculated Field Based On SQL In Text Box

Feb 13, 2005

Hello, Bit of a newby to all this. Am trying to use a text box as a calculted field. I am doing so using an sql statment in control source The sql stat is built and tested using build query and then copied and pasted from sql view)

I keep getting #name? as an error.

I have managed using dlookup of the same saved sql to return the required value (which works) but find it to be a bit slow and clunky so wanted to give this a go instead. If somebody can have a look at the query below I would much apreciate.

=(SELECT Sum(QryInout!CostExVATGBP) AS TTlCostExVATGBP
FROM QryInout &_
WHERE (((QryInout.StockImportNoJoinToAll)=[Forms]![FrmSPurch]![ImportNoNew])) &_
GROUP BY QryInout.ProdType &_
HAVING (((QryInout.ProdType)="Freight"));)

Note that I have tried with and without the &_ and also with or with out the brackets..

Thanks

View 4 Replies View Related

Honors Text Return Based On GPA

Nov 9, 2004

Dear Access Wizards:

I have created a form based on a query with students' gpa in the form. The gpa is in a specific field.
There is another field for honors with is for summa cum laude, magna cum laude, cum laude.

Here is the issue: If the students' gpa is 3.8, return "summa cum laude"
If the students' gpa is 3.5, return "magna cum laude"
if the students' gpa is 3.2, return "cum laude"

This applies to undergraduate students only, which there is a field for.

Any ideas on how to resolve this issue?

Many thanks,

Dion

View 3 Replies View Related

Forms :: Text Box Value Based On Two Other Textboxes

Oct 12, 2014

I have three textboxes , textbox 1,textbox 2, and textbox 3, I can change the value of textbox 3 based on the date of textbox 2 by using

if me. textbox2 < date then
me. textbox 3 ="expired"
end if

but I need it to look at textbox 1 as well and only change textbox 3 to "expired" if both conditions are true. example

if textbox 1 = "abs" and
textbox 2 < date
then textbox 3 = "expired".
end if

View 10 Replies View Related

General :: Text Box Based On Field Value

Jun 26, 2013

Is there a way to have a text box filled out based on the value of a field. There will be only 2 possible phrases for the text box.

=IF( <Expr> Forms![Workorder]![Disposition])=("Return As Is","DISAPPROVE","APPROVE")

This is what I have tried but I get syntax error.The form is Workorder and the field is Dispostion. When the Disposition is "Return As Is" then I want to have the text box yield "DISAPPROVE" otherwise it should be "APPROVE".

View 14 Replies View Related

Forms :: Text Box Value Based On ListBox

Apr 28, 2015

I have 2 form ( Form A & Form B )

Form A contend Contain ListBox
Form B contend Contain bound Text box

I need to know how when double click ListBox at Form A passing value of listbox.Column(0) to bound Text box at Form B.

View 4 Replies View Related

Return Value From A Table Based On A Text Field

Aug 27, 2006

I have created a text field on a form that uses the DateSerial function to return the value of last month e.g. Jul-06.

I have a table that contains months (e.g. Jul-06, Jun-06 etc) and a corresponding numeric value (e.g. 1,2,3).

I have another text box on the same form that I want to display the numeric value in based on the value that has been returned by the DateSerialfunction. What properties/control source should I set for this field? Or do I need to write some VBA?

Any help would be appreciated.

View 2 Replies View Related

Print Text Based Upon Field Contents

Jun 23, 2006

I want to print text based upon the content of the field but need more than the IIF statement. For example, if the field contains an "A" I want to print "Active", "C" I want to print "Closed", "N" I want to print "New", etc.

Thanks in advance for any help. You guys have always had an answer in the past!

View 1 Replies View Related

Changing Text In Queries Based On Date

Dec 9, 2006

Hiya All

Hope you can help me here


I need help with an update query that will change records for me based on the date

In the record I have a TEXT record called [GI1] that can have a multitude of data in it.
The data can be “EVA”, “CON 10/12/06”, “REQ 10/12/06”, “PAS 10/12/06”, or “B 10/12/06”, and finally “A 10/12/06”

What I need is a query will look at the Data that starts with “B” and change the letter to “A” if the date in the record has passed. {The Date can be any date in any year }

Many Thanks for Looking

Paul

View 2 Replies View Related

Finding Records Based On Text Inputs

Sep 13, 2005

Hello

I am trying to set up a user friendly front end to my database. I would like to have a form which allows the user to enter information into text boxes and then press a button which finds the relevant record(s).

I would like to use it to pin point an employee's record based on at least one piece of information, but possibly combined with up to four more by entering into these boxes. For example personnel number, surname, first name etc.

Is this possible and how do I go about setting it up?

I am aware of the filter function and queries but I can't seem to get either to operate in the way I have envisaged. They don't appear to offer the most user friendly solution, at least not in the format I have tried.


Apologies, but I am still getting to grips with access to be honest.

View 1 Replies View Related

Print A Report Based On Text Box Parameters

Nov 7, 2005

I am trying to create a report based on a table field called "ClassNo".

I would like there to be a pop up that asks for the begining and ending "ClassNo".

View 2 Replies View Related

Autofill Text Boxes Based On Combo Box

Sep 13, 2006

:confused: I have a combo box on a form that is used for data entry that allows the user to pick the date. This is based on a table that includes date, week ending date and month, all very specific for our business. I used a function that says Me.txtBox=ComboBox.Column1 for example. So my combo box would include all the information, and all but the actual date is not visible. I want this to feed into another table that will be used for reporting, and that table has the same fields of date, week ending date and month. I keep getting an error saying that the value selected from the combo box doesn't fit the criteria, and I believe what is going on is that it is taking all the fields instead of just the date. Any suggestions how I can still have the text boxes update if I only have the date in the combo box?:confused:

View 1 Replies View Related







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