473,385 Members | 1,317 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,385 software developers and data experts.

Enter "some" text into combo box with code?

Is it possible to use code to enter some text into a combo box and
then have the cursor placed at the end of the text for more imput?
Nov 13 '05 #1
8 3098
Dim SomeText As String
SomeText = "Some Text You Want To Enter"
Me!MyTextBox = SomeText
Me!MyTextBox.SelStart = Len(SomeText) + 1

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"ShyGuy" <sh****@shytown.com> wrote in message
news:14********************************@4ax.com...
Is it possible to use code to enter some text into a combo box and
then have the cursor placed at the end of the text for more imput?

Nov 13 '05 #2
Thanks for the reply. This worked great on a text box, but I need it
to work on a combo box.

On Tue, 18 Jan 2005 01:35:18 GMT, "PC Datasheet" <no****@nospam.spam>
wrote:
Dim SomeText As String
SomeText = "Some Text You Want To Enter"
Me!MyTextBox = SomeText
Me!MyTextBox.SelStart = Len(SomeText) + 1


Nov 13 '05 #3
Works the same -- Just change MyTextBox in the code to MyCombobox.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"ShyGuy" <sh****@shytown.com> wrote in message
news:q1********************************@4ax.com...
Thanks for the reply. This worked great on a text box, but I need it
to work on a combo box.

On Tue, 18 Jan 2005 01:35:18 GMT, "PC Datasheet" <no****@nospam.spam>
wrote:
Dim SomeText As String
SomeText = "Some Text You Want To Enter"
Me!MyTextBox = SomeText
Me!MyTextBox.SelStart = Len(SomeText) + 1

Nov 13 '05 #4
My Bad. I tried it on a new form and changed the !'s to .'s and it
worked. It still doesn't work on my for so I'll have to look for
what's different.

Thanks very much for your help.

On Tue, 18 Jan 2005 04:24:09 GMT, "PC Datasheet" <no****@nospam.spam>
wrote:
>Dim SomeText As String
>SomeText = "Some Text You Want To Enter"
>Me!MyTextBox = SomeText
>Me!MyTextBox.SelStart = Len(SomeText) + 1


Nov 13 '05 #5
The combo box I am working on has three columns. I am pretty sure
that this is why it isn't working. Is it possible to get this to work
in this situation?

On Tue, 18 Jan 2005 01:04:55 -0500, ShyGuy <sh****@shytown.com> wrote:
My Bad. I tried it on a new form and changed the !'s to .'s and it
worked. It still doesn't work on my for so I'll have to look for
what's different.

Thanks very much for your help.

On Tue, 18 Jan 2005 04:24:09 GMT, "PC Datasheet" <no****@nospam.spam>
wrote:
>Dim SomeText As String
>SomeText = "Some Text You Want To Enter"
>Me!MyTextBox = SomeText
>Me!MyTextBox.SelStart = Len(SomeText) + 1


Nov 13 '05 #6
Although you see three columns, the combobox still only has one value. Look
at the row source property and the bound column property to see if the bound
column is text.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"ShyGuy" <sh****@shytown.com> wrote in message
news:0d********************************@4ax.com...
The combo box I am working on has three columns. I am pretty sure
that this is why it isn't working. Is it possible to get this to work
in this situation?

On Tue, 18 Jan 2005 01:04:55 -0500, ShyGuy <sh****@shytown.com> wrote:
My Bad. I tried it on a new form and changed the !'s to .'s and it
worked. It still doesn't work on my for so I'll have to look for
what's different.

Thanks very much for your help.

On Tue, 18 Jan 2005 04:24:09 GMT, "PC Datasheet" <no****@nospam.spam>
wrote:
>Dim SomeText As String
>SomeText = "Some Text You Want To Enter"
>Me!MyTextBox = SomeText
>Me!MyTextBox.SelStart = Len(SomeText) + 1

Nov 13 '05 #7
This first column is an index key, and it is an autonumber. The bound
column is 1, but I'm not sure if that is the first column or the
second. For some reason I am thinking that the column numbers start
with 0? The other two are text fields. I enter text to search in
the second column and the third is used to reference if there are
duplicates in the second column. So, if the columns start with 0 then
I am searching for a match in the bound column which is a text field.

On Tue, 18 Jan 2005 14:21:08 GMT, "PC Datasheet" <no****@nospam.spam>
wrote:
Although you see three columns, the combobox still only has one value. Look
at the row source property and the bound column property to see if the bound
column is text.


Nov 13 '05 #8
Point 1 --- For the purpose of Bound Column, the columns are numbered 1 to
whatever in your rowsource. So, with the bound column set to 1, the value of
your combobox is the value of the autonumber field. If the combobox is a
bound field and you look at the table where your data on the form is being
saved, you should see numbers.
Point 2 --- The fact that the rowsource of your combobox has an autonumber
says that your combobox is drawing from a set of data already recorded in
the database. In which case it is very unclear why you want to
programatically enter text into the combobox. Please explain.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"ShyGuy" <sh****@shytown.com> wrote in message
news:j3********************************@4ax.com...
This first column is an index key, and it is an autonumber. The bound
column is 1, but I'm not sure if that is the first column or the
second. For some reason I am thinking that the column numbers start
with 0? The other two are text fields. I enter text to search in
the second column and the third is used to reference if there are
duplicates in the second column. So, if the columns start with 0 then
I am searching for a match in the bound column which is a text field.

On Tue, 18 Jan 2005 14:21:08 GMT, "PC Datasheet" <no****@nospam.spam>
wrote:
Although you see three columns, the combobox still only has one value. Lookat the row source property and the bound column property to see if the boundcolumn is text.

Nov 13 '05 #9

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

Similar topics

4
by: fartsniff | last post by:
Hello all. Can someone help out ? I found this PHP code that works just fine, however, I am trying to put it back into its original Javascript form. I am still learning the syntax, etc. for...
0
by: BW | last post by:
Please ignore the rest of the code, except for the highlighted part (or the line 'ent1=Entry(topf, width=25)' to line 'ent1.insert(INSERT, wrong, if you cannot see the color). You can copy this into...
0
by: ginette | last post by:
I really need help with a strange problem. i have a page having ONLY this cleaned and washed HTML code, no client scripting at all and "some" folks are unable to post any file till "some" are...
1
by: carl bloc | last post by:
Have this much done but need help with this bit of code: allow user to modify existing draw data. I think I need a counter to give week numbers so the user can select a week number rather than a...
4
by: melvynadam | last post by:
If I open a new page with very little text on it such as a bugmenot results page is there a way to select some of the text there and assign it to variables? Selecting all and copying to the...
2
by: Rick Ng Chi Wah | last post by:
Dear all, I have a text file call access.log and it contains about 5030 lines. Some lines contain some keyword, e.g. "ricky ng". How can I delete all the entries that contain "ricky ng" line and...
6
by: svsugu | last post by:
hi...... pls tell the code in C#.net to display the texts from a textfile to the textbox. pls explain how to do this....
26
by: Frank Samuelson | last post by:
I love Python, and it is one of my 2 favorite languages. I would suggest that Python steal some aspects of the S language. ------------------------------------------------------- 1. Currently...
5
by: Sudhir123 | last post by:
Hi.. I need to find out whether user has entered only black spaces or some text which might have some spaces.. But i more interested to check for blanck spaces (by spacebar key). how i will find...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.