473,763 Members | 8,423 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ComboBox Thread

Hello,
I posted a msg on the Access-related groups in hope someone there
could help me but since almost two days have past and I didnt get a
response (Im a bit hard pressed with the problem) I thought I might
try some of you guys since you also deal with the Visual part of
visual basic and since vba shouldn`t be all that different from vb....
(I changed the order of the post and edited the junk out a bit to make
it a bit more readable but nothing except that)
"Oren Kaplan" wrote:
Hello All,
I have a ComboBox on my 'Main' Form (the Form is not data
bound, the ComboBox is) which i want the user to be able to
pick from and click on a command that gets the data from the
first column (4 columns are shown) and uses it in some way....
- At first it looks like this:

___________ _ |ŻŻŻŻŻŻŻŻŻ|
|Select Here|V| | Command |
ŻŻŻŻŻŻŻŻŻŻŻ Ż |_________|

- When you click on the arrow it cascades:

___________ _ |ŻŻŻŻŻŻŻŻŻ|
|___________|V| _________ ___________ ___________ _ | Command |
| Main ID |Ż Desc. 1 | Desc. 2 | Desc. 3 |^||_________|
|ŻŻŻŻŻŻŻŻŻŻŻ|ŻŻ ŻŻŻŻŻŻŻŻŻ|ŻŻŻŻŻ ŻŻŻŻŻŻ|ŻŻŻŻŻŻŻŻ ŻŻŻ|Ż|
| Records | For | User | Selection |_|
|___________|__ _________|_____ ______|________ ___|V|
Ż
- When you select a record from the list it shows the 'Main
ID' you selected in the text portion of the ComboBox:

___________ _ |ŻŻŻŻŻŻŻŻŻ|
| Main ID |V| | Command |
ŻŻŻŻŻŻŻŻŻŻŻ Ż |_________|
- And then when you click the Command you can refer to
ComboBox`s value and call a Sub or Function using that value.

Thing is... The ComboBox doesn`t display its DefaultValue at
the begining and when I move the mouse over a record it only
'selects' it, as in highlights it in black, and clicking on
them doesn`t make any difference. In the end the text portion
of the combobox is either empty as usual or full with some
spaces...

Help anyone? Using Access2k over Win2K or NT4.....

Thanks ahead,
Oren


Hey Arvin,
You wrote:
Nice Ascii art! Thanks for not posting a nice fat jpg.

<snip>
thanks :) I had to - I didn`t manage to explain my self in a better
way in words and I wouldn`t have gone to the trouble of screen
capturing anything just for that.
<snip>
I'd use the AfterUpdate of the combobox instead of the command button click
event to run your code.

<snip>
The problem is, though - that the d**n control doesn`t even produce
that event! It doesn`t even get to the point where it changes... I
can`t type in anything and can`t select anything from the list! As
for everything else, well, thanks alot - I`ll keep it on the thread
if others want it but I still need someone to try to understand why
one three different computers and two different systems the combobox
simply won`t let anything happen to it except for the list to cascade
with the right data from the table...

HELP (and thanks :),
Oren
<snip - rest of thread>
If I've missed something else, (i.e. the default
value when there isn't one) you could hard code that value into the command
button something like this: (aircode)

Sub cmdWhatever_Cli ck()
Dim MyVar

MyVar = Me.cboMyCombo

If Len(MyVar & vbNullString) = 0 Then
MyVar = ' The default value
Else
MyVar = MyVar
End If

' Rest of code

End Sub
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

<snip>
Jul 17 '05 #1
1 4781
Oren Kaplan wrote:

.....
> - And then when you click the Command you can refer to
> ComboBox`s value and call a Sub or Function using that value.
>
> Thing is... The ComboBox doesn`t display its DefaultValue at
> the begining ...
If you want to set the 'DefaultValue', (I am assuming the default is the
first value in the list):
Combo.Text = Combo.List(0)
> and when I move the mouse over a record it only
> 'selects' it, as in highlights it in black, and clicking on
> them doesn`t make any difference. In the end the text portion
> of the combobox is either empty as usual or full with some
> spaces...


As for the above - it is a little confusing as to what the problem is? Are
you describing a click on an item in the combobox that produces 'empty as
usual or full with some spaces'? If you are then you must have some code
that is interfering with the 'normal' function of the combobox. Check your
code for any events and references to the combobox in question. If you
can't figure out the problem you might want to post the code related to the
combobox.

Regards
Mike
Jul 17 '05 #2

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

Similar topics

2
5191
by: david s | last post by:
I've got a combobox that I am getting updated data for in real time and need to clear out the values and reload it with the new data. I keep getting an error that I can't access the control because it was created from a different thread. I've been trying to figure out how to do this using Invoke/Delegates, but am greatly confused and stuck. Any help would be greatly appreciated. Thanks! All I need is this, but how do I do it using...
1
2632
by: Bruce | last post by:
Hi, there, I meet a problem about comboBox binding. -------------------- Database: Northwind Tables: 1) Products 2) Categories I create a form (named "form1") to edit the record from Products table.
7
4566
by: Simon Verona | last post by:
I posted this in dotnet.languages.vb.controls but thought I'd post here as well.. I have a combobox that is bound to a dataview generated from a dataset. The dataset has a single table (called "Data") with two columns "Id" and "Description". Id contains a code and description contains the description that is displayed in the combobox.
5
1212
by: Don | last post by:
I have a project wherein I derive a combobox and create a custom Populate() method for it to fill it with objects of a custom class I also created in a second project that the combobox project references. This custom class has the ToString function overridden to display certain information. Everything worked fine until one day the combobox started displaying "AssemblyName.ClassName" (e.g. "MyProject.MyCustomClass") instead of the...
8
26438
by: | last post by:
I am sure this has been asked and answered, but here goes anyway... VS.Net 2005, VB.Net How can you display more than one field in the displaymember property of a combobox inside the datagridview control? I am at a loss. Thanks, David
3
2330
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
Boy am I having trouble with this. Does anyone know here I can get a good example of using a combobox within a dataviewgrid? No matter what I do i get all kinds of errors. My grid is bound to a table and I want one field to be a combobox which gets its list form another table. When I run and click on it, I get the huge error about STA and apartments. Wow. What the heck is that. thanks
3
2210
by: Paulers | last post by:
Hello all, I have been pulling my hair out trying to figure out how to access the selected text in a combobox from another thread. I can get it working with a textbox but it does not with a combobox. Could someone be so kind as to show me an example of how this is accomplished? Many thanks in advance.
1
3539
by: Man4ish | last post by:
Hi, How Eventlistner can be used with rendred combo box. I got one example of combobox in table as follows . /* * Copyright (c) 1995 - 2008 Sun Microsystems, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
1
10631
by: kimic | last post by:
Hello, i am using WPF combobox in my application. 1) I create and add a combobox to a visual container (usualy Grid) by runtime or it is defined in the XAML page 2) I assign combobox source to the new xmldocument, this loads the content and then document xml data populate the combo items 3) When page init is finished i load page data to setup the form, I set loaded comboboxes to the selecteditems 4) page.show(); this seems to work, but...
0
9564
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
9387
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10148
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10002
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...
0
9823
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
7368
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
6643
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();...
1
3917
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
3
2794
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.