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

Home Posts Topics Members FAQ

Access 97 Combo Box Problem

I have tried to create a combo box that will allow me to enter a company
name at the keyboard and have it saved alphebetically into the combo box's
list. Using the wizard, I have tried the selection which allows me to enter
data rather than using a table or a query. This gets the text entered
alright but it does not save it to the list. Any help appreciated.

Bill.
Nov 12 '05 #1
4 4564
On Wed, 15 Oct 2003 23:42:53 -0700, "William Bradley"
<br******@magma .ca> wrote:

It don't work that way.
When you use that option, behind the scenes you have selected a value
list for the rowsourcetype property. The rowsource contains the data.
In this case probably something like "CompanyOne;Com panyTwo;". You can
check this in the combobox' property window.
This is a highly unusual way of presenting a list of companies. In
most applications, the list would rather come from a table or a query.

Try that first, or explain to us why the valuelist is better in your
situation.

-Tom.
I have tried to create a combo box that will allow me to enter a company
name at the keyboard and have it saved alphebetically into the combo box's
list. Using the wizard, I have tried the selection which allows me to enter
data rather than using a table or a query. This gets the text entered
alright but it does not save it to the list. Any help appreciated.

Bill.


Nov 12 '05 #2

"Tom van Stiphout" <to*****@no.spa m.cox.net> wrote in message
news:0c******** *************** *********@4ax.c om...
On Wed, 15 Oct 2003 23:42:53 -0700, "William Bradley"
<br******@magma .ca> wrote:

It don't work that way.
When you use that option, behind the scenes you have selected a value
list for the rowsourcetype property. The rowsource contains the data.
In this case probably something like "CompanyOne;Com panyTwo;". You can
check this in the combobox' property window.
This is a highly unusual way of presenting a list of companies. In
most applications, the list would rather come from a table or a query.


Thank you Tom. I am presently computerizing our parish records that go back
to 1887. To do this I am using software that uses Access 2000 as its base.

One field is where I enter the ministers name. This is a combo box. When I
enter the ministers name it stays there from record to record until I either
change it or close the programme.

If the minister changes, all I do is type over or delete what was in the
box. This new ministers name will stay there now until I either change it or
close the record, and so on, from minister to minister. However, when I hit
the combo box button, all the ministers names that I have entered are there,
listed alphabetically.

When I close the programme it returns the "minister field" to blank, but
again, if I hit the combo box button all the names I have entered are there.

This is a neat feature, especially when you are doing something similar to
what I am doing now, and would like to be able to repeat it.

Thanks, Bill.
Nov 12 '05 #3
Put this code in the NotInList event of the combo box.

Dim Db As Database, rs As Recordset
Dim strmsg As String
strmsg = "'" & NewData & "' is not in Current List"
strmsg = strmsg & "@You Must Add it to Continue"
strmsg = strmsg & "@Click Yes to link or No to Cancel."
If MsgBox(strmsg, vbQuestion + vbYesNo, "Add new Description?") =
vbNo Then
Response = acDataErrContin ue
Else
Set Db = CurrentDb
Set rs = Db.OpenRecordse t("tblYourTable ", dbOpenDynaset)
On Error Resume Next
rs.AddNew
rs!YourField = NewData
rs.Update
rs.Close

Set rs = Nothing
If Err Then
MsgBox "An error occurred. Please try again."
Response = acDataErrContin ue
Else
Response = acDataErrAdded
End If
End If

Make sure that the LimitToList property is set to Yes.

The program will report that the name you have entered is not in the
database and offer to add it for you.

HTH
Patrick

On Wed, 15 Oct 2003 23:42:53 -0700, "William Bradley"
<br******@magma .ca> wrote:
I have tried to create a combo box that will allow me to enter a company
name at the keyboard and have it saved alphebetically into the combo box's
list. Using the wizard, I have tried the selection which allows me to enter
data rather than using a table or a query. This gets the text entered
alright but it does not save it to the list. Any help appreciated.

Bill.


Nov 12 '05 #4
"Patrick" <in**@businessf ormat.co.uk> wrote in message
news:t2******** *************** *********@4ax.c om...
Put this code in the NotInList event of the combo box.

Dim Db As Database, rs As Recordset


Thank you Patrick, I will do as you suggest.

Bill.
Nov 12 '05 #5

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

Similar topics

5
3322
by: will eichert | last post by:
Greetings. I have a problem with a combo box incorrectly displaying blank items when returning to a form from a modal form. It's fine when the main form first comes up, but gets messed up when the main form is reactivated following opening and closing a modal form. Strangely, this was not a problem until I started using my Access 2000 db in Access 2003 (as an Access 2000 db). Details follow... I have an unbound combo box on my main form...
0
2415
by: Sabine Oebbecke | last post by:
Hi Experts! I have several forms and reports where controls get their values with 'Forms!MainForm!Control' or 'Forms!MainForm!Subform!Control' resp 'Forms!MainForm!Subform.Form!Control' which works without any problem in Acc97, 2000 and 2002, but now in Access 2003 there seem to be a problem with this. A user is working with my app, and he uses an Access 2002 MDE in an Access 2003 environment.
14
2189
by: Steve Jorgensen | last post by:
I just got paid to solve this problem for one client, so I might be impeding future business opportunities by sharing this secret, but a rising tide floats all boats, so... I've seen this mysterious problem now in many Access C/S applications. Usually some random GUI or workflow changes make the problem, but for at least one of my clients, the problem was chronic. You have an Access form bound to a linked SQL Server table. You try to...
4
1578
by: awalker1 | last post by:
Hi all, I have a datagrid and a drop down list on my page. The DataGrid is created dynamically at runtime to contain columns based on the item that the user has selected from the drop down list. Some of the columns need to be a ButtonColumn so that the user can click on them to be taken to another page. This "click" is handled by the ItemCommand" event of the datagrid.
2
4239
by: egoldthwait | last post by:
I need to convert a 17mb access 2000 db to Oracle and house it in a Citrix farm. The issue: we have never converted an Access Db to Oracle but can probably use Oracle's Workbench to assist with this. Also - the citrix folks do not want us to keep the FE in Access as the queries and other activities consume a lot of power. The users will be in 3 different offices across the globe all accessing the 1 Oracle DB in Citrix. Does anyone have...
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.
2
3228
by: Michael Bialowas | last post by:
Hello all, I have been searching the net endlessly and found this ng, so I thought I would give a try. Anyways, I have a few problems I am trying to implement a combo box which presently contains the following: Description, Price, and Treatment code. I wish to do the following: when the description field(combo box) is clicked I want the price, treatment code, insured field to become automated(update the corresponding data automatically)....
6
6268
by: onnodb | last post by:
Hi all, While working on an Access UI to a MySQL database (which should be a reasonable, low-cost, flexible interface to the DB, better than web-based, much less costly than a full-fledged .NET app or so.... is it?), I tried measuring the bandwith consumed by the Access/MyODBC/MySQL link, which came out to be, er, quite high. I fancied it would be interesting to look at the queries Access throws at MySQL through the ODBC link, so I...
4
2616
by: keri | last post by:
Hello again, While I try and solve the calender issue I also have another problem. I have a form & table (appointments) where the user records appointments in the future. The fields include date, time and duration. I would like a pop up box to appear when registering an appointment if the time / days clash with another appointment. Somehow I need to create a table or query that blocks out sections of
5
4007
by: giandeo | last post by:
Hello Experts. Could you find a solution for this problem please! I have the following tables in Access Database Table Name: origin Fields Names: country, countrycode Table Name: make Fields Names: countrycode, make
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...
0
10169
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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...
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
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.