Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Combo And List Boxes To Text Boxes?


Connecting sub-menus to rich text boxes is fine is most cases but the user does not always want to use menus to load and display text. Applying the same technique as sub menus to text boxes with combo or list boxes just wont work could someone please help me out with this one.

Both combo and list boxes will for example:

Contain an alphabetic list.
When the user clicks on a file it should locate the text file from the drive.
It should then open it into a rich text box on the same form.

Could this be possible?

Please any help will greatly be appreciated.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Reading From An XML Into Various Text Boxes And A Combo List
HI, I've done lots of searching in the forum and others trying to find a solution to my problem but I can't seem to grasp the logic or find a suitable example. Just wondered if someone could help.

My program loads and is passed an xml file automatically, the structure is something like this

<customer>
<dob>08/08/1990</dob>
<sex>Female</sex>
<forename>Sally</forename>
<surname>SMITH</surname>
<custom_id>12345</custom_id>
<address>
<housename>The Cottage</housename>
<housenumber>20</housenumber>
<roadname>Harrow Road</roadname>
<locality>coleswood</locality>
<county>W yorkshire</county>
<postcode>LT12 3NQ</postcode>
</address>
<books><book><isdn>1234</isdn><author>D. SMITH</author><issuedate>21.11.2006</issuedate></book><book><isdn>3456></isdn><author>E. JONES</author><issuedate>17.10.2006</issuedate></book></books>

etc

My problem is how do I assign each entry to a text box, i.e. txtDOB.Text=08/08/1990
txtForename.Text=Sally
etc
and also when it gets to the <books> section I want to be able to put each entry into a list, this one can be variable, it could have one or two books or as many as a hundred.

I would appreciate an example as the ones I've seen don't really cover what I want to do, or more likely I'm missing what I'm supposed to be doing.

Greatly appreciate any help / advice, many thanks

Saving Text For List/combo Boxes
I'm still having trouble with something, i need to save simple words to a file, not a type or nethin like that, just a list of words

how do i do that...also its for later use to load the words into a combo or list, how would i make it so that was possible?

im stuck! ¬_¬

Xtrava

All Things In Form Text Boxes List Boxes...Saving
Is the a command thats save every thing that is changed changed in form ...all text boxes all list boxes ...everything that has changed

Web Control, List Boxes, Text Boxes, Please Help This Is Winding Me Up!
Hi guys i need some help with the webcontrol function in VB6

Part of my program needs to put listbox data from the program into a text box on the web and then click a submit button...

The list box i have has a list of multiple directories in (for the location of my files), from there i just want the program to put the top directory of the list box into a text box on the web and click a submit button on the web (its for uploading a queue of files), then after that has finished uploading, do the next directory in the list box... etc

It sounds pretty simple but i have no idea how to do it...

Thanks for any help you can give me, i will write a really good review about you and good rating etc.

Any knowledge of this would be greatly appreciated

thanks a bunch

toodle pipples

Alex

Combo Boxes Or List Boxes?????
A bit of a beginners question. Hope it makes sense

I dont know which is the best to use. Here is the problem:

I want some kind of drop down list that allows the user to pick one of 12 items. Then that item is linked to a set of numbers. For e.g. if user chooses the item "A" then this means the numbers 0.025689 and 0.85696 is linked to each. Now do i use a combo or a list item or something else.

In addition what kind of code do you use to enter new items in a combo box or list item box. I tried to use:

ComboBox1.AddItem "A"
ComboBox1.AddItem "B"

within the combo box private sub - but when i play it back the combo box is empty. Any ideas???

Thanks

Help With Combo Boxes And Text Boxes
Hello, I am making a little test program and I want it so I can click on a item in my combo box and that word appears in my text box... any ideas? help please.

Text Boxes And Combo Boxes
I am trying to create a system that will allow you to pick a name from a combo box and then other information about the person will appear in labels when a command button is clicked. The problem is, is that i do not know how to get the databar to link the correct information with the labels and with the right name.

Any Help??

List Boxes And Text Boxes
Ok i have a list box that has a list of movies to choose from then you choose how many tickets you want i want to know how to display them in a text box and how to clear the dat file that i saved it in

List Boxes And Text Boxes
I have a list box with a bunch of items in it. I'm trying to make it so that when you click on an item in a list, the text appears in a text box. I don't know too much.. but what I have so far is

Private Sub List1_Click()
Dim i As Integer
Text1.Text = List1.List(i)
End Sub

What this does is when I click an item, it makes the text of the textbox the first item in the list. How do I change it so that I can pick an item from the list and have the text of that item displayed in the text box? Thanks in advance!

List Boxes = Text Boxes
Hi I'm new here (and to VB). I'm using VB in Excel and trying to get a list box to write to a series of three text boxes. I have a mobile phone user form and the list box has a selection of phones in it. I want the user to be able to choose three phones from the same list box and have the results display - one in each box. Can I do this and, if so, how?

List Of Combo-boxes
Hi,
I am making an application where I will present a list of properties to the user. Each property may be entered either through a text-box or a combo-box. So far, things are easy. However the number of properties is dynamic and there may be quite a few, so I would need to use some kind of scroll control to look through them all.
I have seen a control in a program that would be perfect, but I have no idea where to find something similar. Have anyone seen something like this?



Thanks in advance!

Espen

List/combo Boxes
I've just started a project in VB6 (been programming Access 97 and 2000 for a couple of years), the problem I am having is with list/combo boxes, is there a VB list/combo box that can hold multiple fields similar to an Access list/combo boxes e.g. if I wanted to show last name, first name, address and DoB of an employee, or would I just concatenate the fields in a query

many thanks

List/Combo Boxes
Hi,

How do you set the opening line of a list/combo box at run time??

By opening line, I mean this, for example: 'Please make a selection.....'

I can get it to display at design time, but every time I run the app, it disappears, any suggestions?

sorry if this is an easy one,
Thanks, matt

Combo List Boxes
Does anyone know how to use a combo list box so that when one of the items in the list is clicked on, a procedure or function is executed? Is there any syntax like:

Combo1.getString

and this would give the string that is displayed in the list box so that the Combo_OnChange() function would then be able to determine the string value and depending on the value received from this you could then execute certain procedures or functions.

Any help would be appreciated.
percidae@hotmail.com

Combo/List Boxes
When making a multi-columned combo box(or List Box) in Visual Basic, how can I make the box actually "Display" the whole selection of the multi-columned rows? When I make the Combo boxes currently, I get the multi-columns of data to display, but when I "Select" my row choice, I do not get an actual "Display" of more than one column of this particularly chosen row of information.

For instance, I may have a row that contains the following columns

of info: Name, Number, City and State. But when I make the Row selection,

only one of these columns will actually be displayed after I have made my

row choice and the drop-down list is no longer dropped down. This same

problem occurrs with List Boxes and I am wondering if there is a fix for

list boxes that is similar to a fix for combo boxes.

Thanks!

Colors In Combo / List Boxes
I have several combo / listboxes.
Rowsource for these covers a lot of values / items to select.
I would like to tell users of my program that some few of the listed values in the combo / listboxes are more preferred than others. The way I would like to do this is to give some values a "special " bacground color.
So when the user scroll down the list and maybe sees some values on "light blue" background it shold give him a hint.

So VB fellows, How do we do this

Clearing List And Combo Boxes
What is the best way to delete all the items in a list or combo box?
When the list is large, removeitem is slow.
Thanks Mike

Linked List And Combo Boxes
Hi Everyone,

Another Quick question:
Is there a way to link a List box and Combo box to a database using the Data Enviroment?

Example:
I have an access table that contains a list of employee that I would like to have autofilled in a combo box on a form. I would like to have the combo box automatically look it up with out having to use the .additem method, since there are more then 5,000 emplyees.

Any iteas?
Thanks
BDS

Dropping Down Combo/List Boxes
How would I drop down a combobox after is is done filling it's items?

Combo Boxes...saving List
Ok, I have this combobox where the user can type in a name and add and delete the name from this combobox. Well when the program is shutdown it resets the list. How could I save the list? I thuoght about registry but that would work would it? How would the program know what reg entries to open when the program was loaded? Anyone know how I could do this?

Info On List And Combo Boxes
HI there, i need so help!

I am trying to create a list box that will display more than on field at a time? If you have any tips then give me a shout.....

It would be cool if you can display icons in the list box as well as a bonus...

Rohan

List Index On Combo Boxes
Hi,

I have 2 combo Boxes and when I select one, I want only a certain few items to appear in the other combo box not the full list...e.g. In the First one I have a list of Cars and in the second a list of all makes of that model.
first combo box list = ford, toyota,opel, VW
second combo box = fiesta, focus,mondeo.avenvsis, corolla, Clio, Polo, Golf,Passet

When I select Ford, how do I just get Focus, Fiesta,Mondeo to only appear in the second combo box and not all the list.

I am loading the combo boxes through a recordset.

If any ony has any idea on how to set the listindex, I would be most grateful.

Thanks.

Combo/List Boxes Linked To A Database
Hi Guys

I am a complete newbie at being a newbie and in need of some help from you dear folk.

Im setting up a small application for a Computing Studies project in sixth form. Our aim is to make the software handle different data such as employee data, customer data and stock data for our chosen business. I chose a small music/games shop. I like to keep things basic... see.

Moving on: Ive been through my brain in 1,000 cycles searching for a different way to do an 'Add New Order' form but I can only see justice in using either a combo or a list box to display the different products in a stock table in an Access database. My problem is that Im unable to make the list or combo boxes display the different products inside the stock table. It will show one, then leave the rest blank. Ive tried binding them with a simple data control as well as an ADODC. Its just not working.

From what Ive seen Im about to get flamed for binding objects - but Im not serious programmer so it was the easiest way.

The question without the waffle is: Is it possible to link a combo/list box to a list of different products inside a table? Either using SQL code or bound controls?

If anyone understands what Ive just typed - I would seriously appreciate any bit of help I can grab.

TIA to you all

JG

Locking Dropdown Combo/list Boxes
I have developed an application in excel that requires an excel sheet to be locked prior to the user entering information into a custom form dialogue. I can lock the form so that users can not enter information into cells however combo boxes still function as normal (the allow selections). Is there anyway of disabling these objects to allow the sheet to be fully locked ?.

kind regards

Martin

Add Text To Text Boxes Like List Boxes
ill explain this the best i can i want the user to type in some text then click "Add" and the text will be added to a textbox i know you can do this alot easyier with list boxes with the .AddItem but how would i do it so far if got this


VB Code:
Text1.Text = "" & Text2.Text


But as you notice it just overwrites the text allready in the box and doesnt ass it

Newbie Question...reading Files To Combo And List Boxes
Hi...don't know where the proper forum may be for this...so here we go.. yell at me if I'm in the wrong place

My program is like this...essentially, it is idiotproofing a preformated Excel worksheet (I can do the Excel part....not the problem)

User chooses from different plans, and each plan has umpteen (yes, that's an actual number) options associated with it. Sooo, I wanted to be able to read in the plan options from a source and integrate that into a text box. I didn't know the best plan to do this...

I have been able to get it to work with a good ol text file.

User chooses "Plan1" from combo box. This makes file "Plan1Options.txt" open and reads in and puts it in the right place and everything...fine.

But when I package my program (for setup.exe)...I would prefer the user to not be able to see this file, or modify, etc. I would also like to put in a new part of my program so the user can update/ put in new plans and plan options to go with the new plan. I think I can do this with text box for allowing input. But I also would like this to be "unreachable" by the user except via the program module. (idiotproof my idiotproofing program)

Are databases going to help me here? (I truly am teaching myself this, and have only been doing it for about 3 weeks...so sorry if I come across stupid)


Thanks for any thoughts or redirection you could give me...


Doug

Sql From Text Or Combo Boxes
I am building this little application that lets a user fill some text fields like
COUNTRY, CITY, HOTEL, BUDGET, CATEGORY DATE FROM ,DATE TO.
The user should be able to type in one or more fields and all of the above the information to be retrieved from a access DB and be displayed on a data grid or similar, when the user clicks on a command button. The more fields he types, the more refined his search will be. An example is the user wants a Hotel in Hawaii and want to spend $50, he fills in the Fields COUNTRY, CITY and BUDGET and all the Hotels that fill that criteria should come up on a datagrid or similar. There might be more than one Hotel with the same name in the chosen city. The database was built by different people and it changes very often, so some people might type the same restaurant name in a diferent way. Also, the budget would be a number that would then evaluate all values in the budget column of the database with a 10% margin over or under the value entered. I have the following code but don´t know how to get it toexecute against the DB and how to display it.

-----------------------------------------------

Private Sub cmdGo_Click()
Dim sCountry As String
Dim sCity As String
Dim sHotel As String
Dim sBudget As String
Dim sCategory As String
Dim sDate_From As String
Dim sDate_To As String
Dim result As String
Dim Sql As String
Dim SqlWhere As String
Dim high As Double
Dim low As Double


sCountry = CStr(txtPais.Text)
sCity = CStr(txtCidade.Text)
sHotel = CStr(txtHotel.Text)
sBudget = CStr(txtBudget.Text)
sCategory = CStr(txtCat.Text)
sDate_From = CStr(txtCheckIn.Text)
sDate_To = CStr(txtCheckOut.Text)

Sql = "Select * from Hotel_Table " _
& "Where "

If Len(sCountry) > 0 Then
SqlWhere = "Country = " & sCountry & " "
End If

If Len(sCity) > 0 Then
If Len(SqlWhere) > 0 Then
SqlWhere = SqlWhere & " and City = " & sCity & " "
Else
SqlWhere = SqlWhere & " City = " & sCity & " "
End If
End If

If Len(sHotel) > 0 Then
If Len(SqlWhere) > 0 Then
If Len(sHotel) > 2 Then
SqlWhere = SqlWhere & " and Hotel like '" & Mid(sHotel, 1, 3) & "%'"
Else
SqlWhere = SqlWhere & " and Hotel = '" & sHotel & "' "
End If
Else
If Len(sHotel) > 2 Then
SqlWhere = SqlWhere & " Hotel like '" & Mid(sHotel, 1, 3) & "%'"
Else
SqlWhere = SqlWhere & " Hotel = '" & sHotel & "' "
End If
End If
End If

If Val(sBudget) > 0 Then
high = Val(sBudget) * 1.1
low = Val(sBudget) * 0.9

If Len(SqlWhere) > 0 Then
SqlWhere = SqlWhere & " and Budget Between " & high & " and " & low & " "
Else
SqlWhere = SqlWhere & " Budget Between " & high & " and " & low & " "
End If
End If

If Len(sCategory) > 0 Then
If Len(SqlWhere) > 0 Then
SqlWhere = SqlWhere & " and Category = '" & sCategory & "' "
Else
SqlWhere = SqlWhere & " Category = '" & sCategory & "' "
End If
End If

If Len(sDate_From) > 0 Then
If Len(SqlWhere) > 0 Then
SqlWhere = SqlWhere & " and Date_From = to_date('" & sDate_From & "', 'mm/dd/rr')"
Else
SqlWhere = SqlWhere & " Date_From = to_date('" & sDate_From & "', 'mm/dd/rr')"
End If
End If

If Len(sDate_To) > 0 Then
If Len(SqlWhere) > 0 Then
SqlWhere = SqlWhere & " and Date_To = to_date('" & sDate_To & "', 'mm/dd/rr')"
Else
SqlWhere = SqlWhere & " Date_To = to_date('" & sDate_To & "', 'mm/dd/rr')"
End If
End If

If Len(SqlWhere) = 0 Then
Sql = "Select * from Hotel_Table"
Else
Sql = Sql & SqlWhere
End If


MsgBox Sql 'to test how the sql is built. to be removed
End Sub

Text/Combo Boxes Appear First
I'm sure this is something on my side but I haven't bee able to get a handle on it for the last four or five years. Here's my problem. I have a large application with a midi form that spawn the various forms. My forms have anywhere from 150 to 250 controls on them with a lot of arrays for the labels and text boxes. This broblem however I can recreate with even small forms. I do a load of all my child forms at program startup. When I do a show of the forms however, for a brief half second the text and combo boxes show first then the rest of the form is displayed. I've tried setting the text and combo boxes to visible = false and tried to set them as visible at forn activate but that didn't help much. I've played with redraw on both the midi and called form. I've even tried using LockWindow and nothing seems to work. No other type of control gives me this problem. My pictures, frames, and labels show as the should. Is it a speed problem where text/combo boxes appear quicker than the rest of the controls? Any ideas. Thank you...

Combo Boxs And Text Boxes
Hey all,
How could I get a couple of text boxes in one form change the list in a combo box in a second form?

Thank You
-gamesfreke

Combo Box Populating Text Boxes
I have tried everything for days with this project to get it to read from the combo box onto the 4 seperate text boxes. Can someone please point me in the right direction?

I inlcuded the code for this relevant part of the project:



Code:
Private Type udtPhoneRecord
strLastName As String
strFirstName As String
strAreaCode As String
strPhoneNumber As String
End Type

Dim mPhoneBook() As udtPhoneRecord 'array of phone records
Dim mintRecordNum As Integer 'number of records in array, set to 0
Dim mstrMsg As String
Dim mintResponse As Integer

Private Sub mnuDisplay_Click()
'Display the record for the selected name

If lblAction.Caption <> "Action: Add" Then
ReadRecord
DisplayData
End If

End Sub

Private Sub ReadRecord()
If cboRecord.ListIndex <> -1 Then
mintRecordNum = cboRecord.ItemData(cboRecord.ListIndex)
Get #1, mintRecordNum, mPhoneBook(mintRecordNum)
Else
mstrMsg = "Select a record to Display"
MsgBox mstrMsg, vbInformation, "Phone Number File"
End If
End Sub

Private Sub DisplayData()
'Display the data for the selected record
With mPhoneBook(mintRecordNum)
txtLastName.Text = .strLastName
txtFirstName.Text = .strFirstName
txtAreaCode.Text = .strAreaCode
txtPhone.Text = .strPhoneNumber
End With
lblAction.Caption = "Action: Display"
End Sub

Combo And Text Boxes + String Value
Hi i 20 textboxes and combo boxes on my ms access 97 form and each of then has a conditional formatting sub. I would like to create one sub where i can parse the textbox or combo box name. For example


Code:
Private Form_Load()
Call ConditionalFormatting (name1)
End Sub

Private Sub ConditionalFormatting (strname as String)
cmb & strname & _Who.Enabled =False
' should be cmbname1_who.Enabled = False
.
.
.
.
.

End Sub



however i'm getting this error " Compile Error Expected: expression'

Any ideas why???

Updating Text Boxes From Combo Using ADO
Hi

I have an Access2000table which contains ID, Cities, State and Postcodes and on my form (VB6) I would like to update text boxes for the state & postcode from data fetched from the table in a City combobox and have the corresponding data change in the text boxes depending on the city seleted.

 I amusing this SQl Statement on the form load:
    rec1.Open "SELECT * from tblAuspostcodes", con1, , adLockPessimistic
    With rec1
        While Not rec1.EOF
                cboag(2).AddItem rec1!("City")
                txtFields(25) = rec1!('State")
                txtFields(26) = rec1!(Postcode")
                rec1.MoveNext
        Wend
    End With

I have tried putting the same code on the ComboChange/ Lostfocus but nothing happens.
In Access you just have to refer to the column Number of the combo to update the textboxes - Me!State= Me![City].Column(2)

I would really appreciate some help on how to do this in VB.

Thank you

ernest32

How To Get My List In Several Text Boxes
in my project i get my list in a list box
bt i want to get my list in different textbox

heres the code

Dim roomString As String
Dim roomData As String
Dim roomDataHex As String
roomData = Left(strData, 3)
roomDataHex = HextoAscii("02 02 C4")
If roomData = roomDataHex Then Text1.Text = strData

Dim dataUser As String
Dim rstring() As String
Dim a As Integer

If Len(Text1) > 27 Then
dataUser = Mid(Text1, 16, Len(Text1) - (Len(Room.Text) + 21))
rstring = Split(dataUser, ";")

Dim values As Variant

List1.Clear
values = rstring
For a = LBound(values) To UBound(values)
List1.AddItem values(a)
Next a
End If

please help me..

Text && List Boxes
Hey there everyone, by viewing the image below you can see a screen of the GUI of my application, basically im making a little something to make my life a bit easier.. I would like the text from text boxes 1, 2 and 3 to be listed in the listbox when a command button is clicked, however i dont want the text to appear in the list box like Text1Text2Text3 as i would prefer the words to be divided by spaces or a symbol.. Refer to the image for more in-depth information. Help is more than appreciated.

Text And List Boxes
Howdy All

My question is how do you scroll down a text box in code? and how to you highlight an item in a listbox and then scroll down to the next one and highlight that so you can sort of check a listboxes content line by line.

thanx

------------------
Mooose

Can You Have Multiple Colours In Text Boxes, Or Richtext Boxes(etc)?
Is there anyway you can have each word in a text box a different colour? Like:

[RED] My Name [/RED]
[BLUE] What's up! [/BLUE]

or something similar?

I don't care if you can't do it in a text box but is there anyway to do it in any type of "text box"?

If sub classing is involved could you please point me to a tutorial?


Thanks a lot.

Unable To Access To Text Combo Boxes
I am having a strange problem occur with a set of forms I am designing.

I have three forms: FirstNotification, Inquire, and SafetyInvestigation.

I was designing code to reference a text box on SafetyInvestigation to be the same as a companion text box on Inquire.

I was attempting to type in the statement Inquire.IncidentNumTb.value and VB returns that the Object is not defined. In actuality I cannot refernce any of the text, combo, label boxes, etc that have been designed in the form in this manner. The problem only appears to occur on the Inquire form and not the other two.

Does anone have any idea what I may have messed up?

Changing Text Boxes When Clicking On Combo Box
Hi! I have a problem that I assume is very simple to solve I just don't know how to do it
I have a combo box and 3 text boxes linked to an MSAccess database. I want to choose an item in the combo box and change the text boxes to display the information for the current record.

So far I have:

adoPhone.RecordSource = "select * from rates where country = " & cboCountry.Text
adoPhone.Refresh

I get an error that says:
"No value given for one or more required parameters."

And then the refresh fails.

I am an absolute beginner. Can you help?

Thanx!

Text File Information Into Combo Boxes
Hi,

I have a text file which is set out as below.


Part1 |PartNumber1 |Details1
Part2 |PartNumber2 |Details2

How would load the columns into combo boxes and have it so that if i select part1 from the combo box the other combo boxes would update to show the correct data for that part?

Thanks

Stuart

Populate Text Boxes From Combo Box**RESOLVED**
Anyone got good examples of how to populate text boxes when the user selects an item from a combo box.

i.e. I've got a form - when i click a record from my combo box i need to display whats in that record in the multiple text boxes below.

What do i put in form load & what do i put in the combo click event?.

tia

Tabbing, Text && Combo Boxes **SOLVED**
I am working on a program with text boxes and combo boxes. I must have made a mistake somewhere. When I start with the upper left box and tab, it doesn't tab to the next box just to the right. Instead when tab is pressed the cursor seems to jump around in a weird order.

My Question is, can I change the order of the tab sequence without deleting all of the boxes and starting all over.

Setting The Text Portion Of Combo Boxes
I have a combo box with a number of items which can vary from one the user to the next running the software. I need to default the text portion with one of the values in the list but cannot do this merely by setting combo.text to the value as it's a read only property.
I have the following but cannot get it to work

Public Declare Function SendMessageAny Lib "user32" Alias "SendMessageA" ( _
ByVal hWnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) As Long

Public Const CB_SELECTSTRING = &H14D

FindString = oCurrentArea.GetTitle & Chr$(0)

hIndex = SendMessageAny(cboPrefixAreas.hWnd, CB_SELECTSTRING, -1, FindString)

where findstring equates to a simple text string, and is one of the values in the list.

Any ideas or has anyone tried this before ?

cheers

Parsing A Text File Into Combo Boxes
I have a comma delimited text file I am trying to get to split into two combo boxes. I want the first item in the CboID then the second item in cbospokenword. I have attached an example of my test file. I used this code to get all into one combo box.

Dim lngFileNo As Long
Dim str As String

CboID.Clear
lngFileNo = FreeFile

Open "C:JoeyVisual BasicVocab_LocaterMyFile.txt" For Input As lngFileNo

Do While Not EOF(lngFileNo)
Line Input #lngFileNo, str
CboID.AddItem str
Loop

Close lngFileNo

CboID.ListIndex = 0 'select first item in list

Text File To Multiple Combo Boxes
Help needed!

I am trying to write to two combo boxes with different values from a single text file.

I am able to re-write the text file into any format. Hope this is clear.

Thanks
Qwerty007

Compare 2 Combo Boxes And Get A Text Result
I know I am close, but I am very rusty at this VBA
stuff.
I get a result, but it happens for each option I choose from
my combo boxes.

Basically this is the whole picture. I have this matrix that am
following. I have 5 values for each combo box. If you choose
a "1" from one dropdown box, and a "1" from the other
dropdown box, THEN you get this certain text in a textbox.
results is my text box.
Here is my pseudo code:

Private Sub critnum_AfterUpdate()

Dim assm As Byte

Dim crit As Byte

assm = assnum - - This is one field (one combo box)

crit = critnum - - -this is the other field, and after this is chosen, I should get a result. I have to do about 25 IF Then statements,

because there are 25 possibilities.

If (assm = 2) + (crit = 2) Then

results = "Critical"

End If



End Sub

Thanks All, No pressure, but I have to have an answer today.

Automatic Population Of Combo And Text Boxes
Hi

I have created an input form(inpform) in access using VBA and I need to automatically populate other boxes on the form (from a separate table) when the contents of one box is entered.

The documendet table contains the following fields:-
Filename
System
Menu
Docname
Docdesc

When the filename is selected from the filename combo box on the input form (inpform) this should automatically populate the system combo box with the system used, the Menu combo box with menu the document is on, the document name text box with name of the document and the document description text box with details of what the letter is for. All this information is held in the documendet table.

E.g

When filename "BIRTHDAY" is selected from the filename combo box on the input form this should automatically populate the system combo box with "WORD", the Menu combo box with "LETTERS", the document name text box with "HAPPY BIRTHDAY LETTER" and the document description text box with "A LETTER TO WISH THE CUSTOMER HAPPY BIRTHDAY".

Being new to VBA I'm not even sure where to start with this so any help would be greatly appreciated.

Thanks

Jules



Edited by - julesl on 10/6/2003 12:58:26 AM

Need Help Feeding Data Into Text Boxes With Use Of Combo Box
I have a program that has 200 records of details about computers. It is rather a task getting from the first record in the program through to records further down the database etc.

I have created a combo box that will show the list of all computers in my program. How am I able to select a computer name from this combo box that automatically fills in the text boxes when selected.

 

Data Entry Through Text Boxes And Combo
I am developing software for data entry through text boxes and combo. I want if textbox or combobox is empty then my cursur should not go to next field. please help me through coding


ps

Working With Combo Boxes And A Text File.
Good morning everyone,

Here is what I am trying to do. I have a text files that contains some information ex:

1st line: "Roland", 1016
2nd line: "Anagraph", 1000

I have to populate my combo box with this information. I have to put the name in the additem and the
number in the item data. Would someone be able to guide me into how to do this? If you need more
information from my part, do not hesitate to ask.

Thank you very much for you time, it is very much appreciated.
Mary

Copyright © 2005-08 www.BigResource.com, All rights reserved