473,397 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Ignoring spaces in combobox text: done,almost!

Arno R <ar***********@tiscali.nl> wrote:
:> user types Mary Jane Jones
:> database has MaryJane Jones

: I finally understand why you need to 'despace' the field in the
: Lookuptable also.
: First idea that comes to my mind now is that I would create the
: 'despaced' values in the LookupQuery:
: Database has:
: MaryJane Jones
: JoAnne Cook

: LookupQuery has: (use the 'despace function' here)
: MaryJaneJones
: JoAnneCook

: This way the validation would be a simple Lookup again where you
: only need to 'despace' the user-input.
Thanks to you and to rkc, I have now got this *almost*
working. I've been able to do the 'despaced' comparison
of user's text with the bound column of the combobox's
rows, using rkc's loop on the rows [rows and columns begin
at 0]. The field I need to retrieve is another column in the
combobox.

I think that the remaining problem may not be easy to track
down without a hands-on attack, but here goes:

My combo-box, which displays one of its 2 columns,
never displays the first row of the table [text-sorted,
ascending on bound column of the combo-box].

I put a MsgBox into the loop to display the combo-box's bound
column for each row: for the 0th row it displays
the missing 0'th table row text as the current [0th-combo-box
row] text, and it displays the first visible bound column in
the combo-box as the message-box title, [I don't provide a
title for the message-box--it usually defaults] with the entire
box strangely elongated.
After that the MsgBox displays as I would expect
from looking at the *visible* combo-box content. Bottom line:
the first [sorted] row of the table can't be accessed from
the combo-box.

Two unrelated things I ran into while working on this:

The spy-helper looking over my shoulder and putting up
red error flags before I get to finish writing a line of code
is driving me nuts--how can I turn her off?

When I try to use a message-box for debugging, it often
destroys my ability to get out of the form--anything I
enter triggers the message-box and the next action of the
form -- even if I mouse-click on exit, design mode, code--
finally I lock up so thoroughly that the only way out is
reboot. [I haven't used Windows much 'til now, so I don't
know tricks about how to recover from lockups]

--thelma
: Arno R

Nov 13 '05 #1
2 1504
rkc
Thelma Lubkin wrote:
Two unrelated things I ran into while working on this:

The spy-helper looking over my shoulder and putting up
red error flags before I get to finish writing a line of code
is driving me nuts--how can I turn her off?
While in the VBA editor tools>options>uncheck auto-syntax checking.
The offending line will still turn red, but the annoying error message
goes away.

When I try to use a message-box for debugging, it often
destroys my ability to get out of the form--anything I


Use Debug.Print instead of a msgbox. You can be as verbose as you
want in your messages to yourself and view it all at once in the
immediate window (ctrl-G). Also read up on breakpoints and trace
code execution in the vba help.

Sorry, I have no clue what your actual problem is.


Nov 13 '05 #2
rkc <rk*@rochester.yabba.dabba.do.rr.bomb> wrote:
:> When I try to use a message-box for debugging, it often
:> destroys my ability to get out of the form--anything I

: Use Debug.Print instead of a msgbox. You can be as verbose as you
: want in your messages to yourself and view it all at once in the
: immediate window (ctrl-G). Also read up on breakpoints and trace
: code execution in the vba help.

Thanks. I'll try that Debug.Print. I've used breakpoints and
watches and trace-code but I'm still more comfortable with
prints.
--thelma

Nov 13 '05 #3

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

Similar topics

14
by: Thelma Lubkin | last post by:
I am trying to limit the user's options to the choices offered by the combobox text, but I don't want this to extend to how he spaces out the text, e.g. 'abcdefg' and 'ab cd efg' should be...
0
by: Susan Bricker | last post by:
The following error: "The current field must match the join key '?' in the table that seves as t the 'one' side of one-to-many relationship. Enter a record in the 'one' side table with the...
2
by: Susan Bricker | last post by:
I went back to read my post and found an error in my description ... here is the post, again, corrected: The following error: "The current field must match the join key '?' in the table that...
2
by: Don | last post by:
I've looked high and low for some code that will allow me to have a combobox with a flat borderstyle. I found a few examples, but nothing that was really usable for me. I had the following...
8
by: barry | last post by:
Have tried a number of things including space(n) in front of the string but when the DropDownList is shown the spaces have apparently been trimmed. Is this something that would have to be done in a...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
5
by: BACON | last post by:
I'm just starting the process of reorganising my modest little website and cleaning up all the HTML, and the logical place to begin was with the homepage. I made a simple little ASP.NET control...
135
by: Xah Lee | last post by:
Tabs versus Spaces in Source Code Xah Lee, 2006-05-13 In coding a computer program, there's often the choices of tabs or spaces for code indentation. There is a large amount of confusion about...
6
by: tbrown | last post by:
I have a combobox with items like this: {one,two,three}. The selected index is 0, so "one" appears in the combobox text. When the user drops down the list, and selects "two", for example, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
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...
0
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,...

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.