help,help,help,help,help,help,help,help,help,help,help,help,help,
Author |
Message |
Enrique G Lug #1 / 5
|
 help,help,help,help,help,help, help,help,help,help,help,help,help,
Hi, I have a small problem, and if you know the answer I would really be thankful for your help. I have an access database which is called "Client.mdb" on a form, I displayed a dbcombox for the costumer's name a textbox for the address a textbox for the city a textbox for the state and a textbox for the zipcode on all my textboxes and the dbcombobox I have set their Datasource and Datafield properties to Data1, when I run the program the information on the first record of the data shows on the form, but what I need to do is, when I change the costumer's name on the dbcombobox (which displays all of the costumer's names on it) I want the textboxes to show the address, city, state, and zipcode of the costumer I have choosen, Thank you in advance, Enrique G Lugo
|
Fri, 23 Jun 2000 03:00:00 GMT |
|
 |
Chris Chu #2 / 5
|
 help,help,help,help,help,help, help,help,help,help,help,help,help,
Quote: >I have an access database which is called "Client.mdb" >on a form, I displayed a dbcombox for the costumer's name >a textbox for the address >a textbox for the city >a textbox for the state >and a textbox for the zipcode >on all my textboxes and the dbcombobox I have set their Datasource and >Datafield properties to Data1, >when I run the program the information on the first record of the data shows >on the form, >but what I need to do is, when I change the costumer's name on the >dbcombobox (which displays all of the costumer's names on it) I want the >textboxes to show the address, city, state, and zipcode of the costumer I >have choosen,
You are not using the controls the way that they should be used. Natively, the controls cannot do what you want without some coding. Use two data controls, one bound to the dropdown control and one bound to the rest of the text boxes, called dbCombo and dbText. In the .Change() event of the dropdown box, do a dbText.Recordset.FindFirst "Name = '" & Combo.text & "'" HTH
- Code Gurus: Custom solutions programmed for your business. - Fair rates, fast response, rock-solid code. Initial consultation free. - Visual Basic, Tiered databases, Java, Perl, Internet programming.
|
Fri, 23 Jun 2000 03:00:00 GMT |
|
 |
Lee J. Wein #3 / 5
|
 help,help,help,help,help,help, help,help,help,help,help,help,help,
After a selection is made in the dbcombobox, the line: Data1.RecordSet.FindFirst "customername = '" & dbCombo.Text & "' " where customername is the name of the data base field. This should move the data control pointer to the record with that name and automatically populate the bound text boxes from that record. Lee Weiner weiner AT fuse DOT net
Quote: >Hi, >I have a small problem, and if you know the answer I would really be >thankful for your help. >I have an access database which is called "Client.mdb" >on a form, I displayed a dbcombox for the costumer's name >a textbox for the address >a textbox for the city >a textbox for the state >and a textbox for the zipcode >on all my textboxes and the dbcombobox I have set their Datasource and >Datafield properties to Data1, >when I run the program the information on the first record of the data shows >on the form, >but what I need to do is, when I change the costumer's name on the >dbcombobox (which displays all of the costumer's names on it) I want the >textboxes to show the address, city, state, and zipcode of the costumer I >have choosen, >Thank you in advance, >Enrique G Lugo
|
Fri, 23 Jun 2000 03:00:00 GMT |
|
 |
dpwrigh #4 / 5
|
 help,help,help,help,help,help, help,help,help,help,help,help,help,
1st...Make sure that all textboxes are databound to data1. 2nd..Make sure that data1 is a snapshot unless you are ready to edit your info. 3rd...Put this snippet in your code. Private Sub DBCombo2_Click(Area As Integer) Select Case Area Case 2 Technician.Recordset.Bookmark = DBCombo2.SelectedItem End Select End Sub Now when an item is selected from the dbcombo all the other fields will be updated to. Perry
Quote: > Hi, > I have a small problem, and if you know the answer I would really be > thankful for your help. > I have an access database which is called "Client.mdb" > on a form, I displayed a dbcombox for the costumer's name > a textbox for the address > a textbox for the city > a textbox for the state > and a textbox for the zipcode > on all my textboxes and the dbcombobox I have set their Datasource and > Datafield properties to Data1, > when I run the program the information on the first record of the data shows > on the form, > but what I need to do is, when I change the costumer's name on the > dbcombobox (which displays all of the costumer's names on it) I want the > textboxes to show the address, city, state, and zipcode of the costumer I > have choosen, > Thank you in advance, > Enrique G Lugo
|
Fri, 23 Jun 2000 03:00:00 GMT |
|
 |
Alex Galki #5 / 5
|
 help,help,help,help,help,help, help,help,help,help,help,help,help,
Quote:
>Hi, >I have a small problem, and if you know the answer I would really be >thankful for your help. >I have an access database which is called "Client.mdb" >on a form, I displayed a dbcombox for the costumer's name >a textbox for the address >a textbox for the city >a textbox for the state >and a textbox for the zipcode >on all my textboxes and the dbcombobox I have set their Datasource and >Datafield properties to Data1, >when I run the program the information on the first record of the data shows >on the form, >but what I need to do is, when I change the costumer's name on the >dbcombobox (which displays all of the costumer's names on it) I want the >textboxes to show the address, city, state, and zipcode of the costumer I >have choosen, >Thank you in advance, >Enrique G Lugo
Try this approach: 1. In your combobox you must add all fields of interest in SQL SELECT DISTINCTROW statement (See Combobox Linesource property): Name (must be first), address, city etc. 2. Write the following procedure on the combobox after update event: Private Sub ComboBoxName_AfterUpdate() Me.Address = Me.ComboBoxName.Column(1) Me.City = Me.ComboBoxName.Column(2) etc... End Sub Here on the left side are the names of textboxes in your form. Leave their Data Source properties empty. Good luck! Alex Galkin
|
Sun, 25 Jun 2000 03:00:00 GMT |
|
|
1. Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,Help,
2. HELP!!!!!!!!!!!!!!!HELP!!!!!!!!!!!!!!!!!!HELP!!!!!!!!!!!!!!!!!!!!HELP!!!!!!!!!!!!!!!!!!!!
3. Help, Help, Help, Help, Help, Help, Help, Help, Help, Help, Help, Help, Help, Help, Help, Help, Help,
4. HELP HELP HELP HELP HELP HELPHELP HELP HELPHELP HELP HELP
5. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,
6. HELP HELP HELP HELP HELP HELP HELP HEL P HELP HE LP HELP HELP HEL P HELP HELP
7. Help Help Help Help Help Help !!!!!
8. HELP HELP HELP Set document name of print job from VB HELP HELP HELP
9. HELP HELP HELP Early Binding Excel 5.0 HELP HELP HELP
10. HELP ME HELP ME HELP ME PLEEEEEEEEEEAAAAAASSSSSEEEEEEE!!!!
11. Help.......Help...........Help........
12. HELP HELP HELP HELP HELP
|
|
|