473,787 Members | 2,857 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combo/Field Problem

Hi,

I have a combo box (Named: Ethnicity) and a field (Named:
OtherEthnicity) . From the combo drop down list when Other is selected, I
want the field next to it to be enabled when the selection is made.

I had a ago constructing some amateurish coding, but it does not work.

Private Sub Ethnicity_After Update()
If Other Then
[OtherEthinicity].Enabled = True
Else
[OtherEthinicity].Enabled = False
End If
End Sub
Nov 13 '05 #1
11 1344
why not just set the LimitToList property of the Combobox to False and
then enter whatever you want?

Nov 13 '05 #2
There is a combo box on the form and another text box besides it, I want the
other text box to be activated when a certain selction has been made in this
case it is Other from the combo box. Setting the limit to list to false does
what to the other text box? Nothing!

<pi********@hot mail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
why not just set the LimitToList property of the Combobox to False and
then enter whatever you want?

Nov 13 '05 #3
Dave wrote:
Hi,

I have a combo box (Named: Ethnicity) and a field (Named:
OtherEthnicity) . From the combo drop down list when Other is selected, I
want the field next to it to be enabled when the selection is made.

I had a ago constructing some amateurish coding, but it does not work.


Try this:

Private Sub Ethnicity_After Update()
If me.Ethnicity = "Other" Then
Me.OtherEthinic ity.Enabled = True
Else
Me.OtherEthinic ity.Enabled = False
End If
End Sub

I personally prefer to follow a naming convention. I would name
Ethnicity as cboEthnicity and OtherEthinicity as txtOtherEthinic ity.

Have a read of this article on the Access web:
http://www.mvps.org/access/general/gen0012.htm

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #4
Thank You, Tim works perfectly, I will follow your naming methods too,
cheers.

"Tim Marshall" <TI****@PurpleP andaChasers.Moe rtherium> wrote in message
news:d0******** **@coranto.ucs. mun.ca...
Dave wrote:
Hi,

I have a combo box (Named: Ethnicity) and a field (Named:
OtherEthnicity) . From the combo drop down list when Other is selected, I
want the field next to it to be enabled when the selection is made.

I had a ago constructing some amateurish coding, but it does not work.


Try this:

Private Sub Ethnicity_After Update()
If me.Ethnicity = "Other" Then
Me.OtherEthinic ity.Enabled = True
Else
Me.OtherEthinic ity.Enabled = False
End If
End Sub

I personally prefer to follow a naming convention. I would name Ethnicity
as cboEthnicity and OtherEthinicity as txtOtherEthinic ity.

Have a read of this article on the Access web:
http://www.mvps.org/access/general/gen0012.htm

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me

Nov 13 '05 #5
Doesn't seem to work with a tick box and a text box (txtDate) though, with
the coding:

Private Sub Check_AfterUpda te()
If Me.Check = "Yes" Then
Me.txtDate.Enab led = True
Else
Me.txtDate.Enab led = False
End If
End Sub

Tried changing the Yes to True but still no luck, any ideas?

"Tim Marshall" <TI****@PurpleP andaChasers.Moe rtherium> wrote in message
news:d0******** **@coranto.ucs. mun.ca...
Dave wrote:
Hi,

I have a combo box (Named: Ethnicity) and a field (Named:
OtherEthnicity) . From the combo drop down list when Other is selected, I
want the field next to it to be enabled when the selection is made.

I had a ago constructing some amateurish coding, but it does not work.


Try this:

Private Sub Ethnicity_After Update()
If me.Ethnicity = "Other" Then
Me.OtherEthinic ity.Enabled = True
Else
Me.OtherEthinic ity.Enabled = False
End If
End Sub

I personally prefer to follow a naming convention. I would name Ethnicity
as cboEthnicity and OtherEthinicity as txtOtherEthinic ity.

Have a read of this article on the Access web:
http://www.mvps.org/access/general/gen0012.htm

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me

Nov 13 '05 #6

Dave wrote:
There is a combo box on the form and another text box besides it, I want the other text box to be activated when a certain selction has been made in this case it is Other from the combo box. Setting the limit to list to false does what to the other text box? Nothing!

<pi********@hot mail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
why not just set the LimitToList property of the Combobox to False and then enter whatever you want?


jeez, no need to get your knickers in a twist. What I was implying,
jackass, was that you did not really NEED the textbox at all, because
setting the LimitToList=Fal se on the combobox allows the user to enter
any value he wants.

Nov 13 '05 #7
Thats fine but it didn't answer the original question.

<pi********@hot mail.com> wrote in message
news:11******** *************@o 13g2000cwo.goog legroups.com...

Dave wrote:
There is a combo box on the form and another text box besides it, I

want the
other text box to be activated when a certain selction has been made

in this
case it is Other from the combo box. Setting the limit to list to

false does
what to the other text box? Nothing!

<pi********@hot mail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
> why not just set the LimitToList property of the Combobox to False and > then enter whatever you want?
>


jeez, no need to get your knickers in a twist. What I was implying,
jackass, was that you did not really NEED the textbox at all, because
setting the LimitToList=Fal se on the combobox allows the user to enter
any value he wants.

Nov 13 '05 #8
"Dave" <no************ *@my.email.is.i nvalid> wrote in
news:Bk******** *******@newsfe1-gui.ntli.net:
Thats fine but it didn't answer the original question.
That's because it's the wrong question. Certain functionality is
built into certain tools, with good reason. You should not go off
and do something different, without your understanding of how the
tools work, and how other applications use the same tools.

Piet was pointing out to you that the correct way of treating the
problem is not the way you intend to do it.

<pi********@hot mail.com> wrote in message
news:11******** *************@o 13g2000cwo.goog legroups.com...

Dave wrote:
There is a combo box on the form and another text box
besides it, I

want the
other text box to be activated when a certain selction has
been made

in this
case it is Other from the combo box. Setting the limit to
list to

false does
what to the other text box? Nothing!

<pi********@hot mail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
> why not just set the LimitToList property of the Combobox
> to False

and
> then enter whatever you want?
>


jeez, no need to get your knickers in a twist. What I was
implying, jackass, was that you did not really NEED the
textbox at all, because setting the LimitToList=Fal se on the
combobox allows the user to enter any value he wants.



--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #9
I'm not disagreeing it is maybe a better way. I'm currently learning by
using different methods for certain functions in my database, not using a
limit to list was one of the functions I don't want to use unfortunately
Bob/Piet, as the user does not want to type into a combo box.
I'm not sure what you meant by the statement 'You should not go off and do
something different, without your understanding of how the tools work' you
would never learn anything if you followed that rule. What makes things
exciting is trying different methods out, you learn about it as you go
along! ;-)

"Bob Quintal" <rq******@sPAmp atico.ca> wrote in message
news:1110411523 .6fd3230db2147e fd47f8a375d6ffc f4d@teranews...
"Dave" <no************ *@my.email.is.i nvalid> wrote in
news:Bk******** *******@newsfe1-gui.ntli.net:
Thats fine but it didn't answer the original question.

That's because it's the wrong question. Certain functionality is
built into certain tools, with good reason. You should not go off
and do something different, without your understanding of how the
tools work, and how other applications use the same tools.

Piet was pointing out to you that the correct way of treating the
problem is not the way you intend to do it.

<pi********@hot mail.com> wrote in message
news:11******** *************@o 13g2000cwo.goog legroups.com...

Dave wrote:
There is a combo box on the form and another text box
besides it, I
want the
other text box to be activated when a certain selction has
been made
in this
case it is Other from the combo box. Setting the limit to
list to
false does
what to the other text box? Nothing!

<pi********@hot mail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
> why not just set the LimitToList property of the Combobox
> to False
and
> then enter whatever you want?
>

jeez, no need to get your knickers in a twist. What I was
implying, jackass, was that you did not really NEED the
textbox at all, because setting the LimitToList=Fal se on the
combobox allows the user to enter any value he wants.



--
Bob Quintal

PA is y I've altered my email address.

Nov 13 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
12596
by: sao | last post by:
I am currently using Access 2000. In my table it is the following fields that are set up: 1 - Staff Name 2 - Department This table is already populated with 100+ records (staff along with department.)
0
1458
by: Mike | last post by:
My original problem was solved by Bruce Dodds (Thanks!!) ORIGINAL PROBLEM I have developed an application for data enty for daily production in my factory. I have one combo box for shifts and second combo box for the "machine names".
2
5473
by: Sean | last post by:
Greetings all, I am attempting to make a form that will filter through several tables that (I believe) have refretial integrity. I am pulling data from several tables into the form and i would like to eventually be able to filter down through the tables untill i can reach one unique record. I am creating a datbase to keep track of registered accounts for a stae program. Each account is registered into the program through a two...
1
1468
by: D Perron | last post by:
I am having a problem working with one combo box that is filtering another combo box. My table is tblResearch. There are two field in this table; one is and the other . I have a form called frmResearch on which there are two combo boxes. The control source for the first combo box is the field StudyCategory. The control source for the 2nd combo box, is the field Study and it's row source is a query called qrySelect. qrySelect...
10
1913
by: Richard | last post by:
I have created a form which sets up a dataview. The form views one record at a time using a currencymanager. This works fine. All my text boxes bind. However I have a combo box which gets its lookup values from another (Advertising) table (AdvertisingID, Advertising). This works .. However, where it doesn't work as well is when the form loads, the combo boxes should bind to the AdvertisingID field and display the respective data.
1
6130
by: sara | last post by:
I am learning how to use simple functions to make my apps more powerful and efficient. On one screen, I want to populate field B: ItemDescription by looking up the ItemDescription in the Items Table. I would use the key to the Items Table from the selection the user made in the combo box. SO: User chooses an item from the combo box whose value is "3". I want to look up the ItemDescription of the Item with the Key "3" and show that...
9
6769
by: Edwinah63 | last post by:
Hi everyone, Please let there be someone out there who can help. I have two BOUND combo boxes on a continuous form, the second being dependent on the first. I have no problem getting the second combo to change depending on what values the user selects in the first box, it's just that every time the user changes the first combobox, the second combobox FOR EVERY RECORD goes blank.
8
2203
by: AA Arens | last post by:
Hi I do have a products table and products-parts table in my Access 2003 database and log all services into a form. I do have at least the following two combo boxes on my form: - Choose Product where as the Row Source (See properties): SELECT tblProducts.ProductName, tblProducts.ProductName FROM tblProducts ORDER BY ProductName;
2
7049
by: biganthony via AccessMonster.com | last post by:
Hi, I decided to install Office 2003 Service Pack 3 on my home computer to test (in full knowledge that there may be some issues with it). After installation, I have noticed that with a small database I wrote for home, the combo boxes and listboxes no longer display the bound column. For example, on a form I have a combo box based on a table called 'names'. The two columns in the combo box are ID and Surname. The combo box and list box...
2
3896
by: banderson | last post by:
Hello, I have a data entry form for a table with information about buildings and am having a problem making a combo box do what I want. I would like to make the combo box show a list of unique bldg mgmt company names and then to open a building management company form to show all records with this name, so the user can find the correct branch location to select. Then, upon closing the building management company form, the active/selected record...
0
9655
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.