If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
OK - no need for a subform after all, now that I see your setup.
On your frmOrder, you want to use a combo box for the Hauler Name values. Use a query as the Row Source for this combo box. The query should obtain the Hauler Name, Hauler #, Contact, and Phone # fields. Then see The ACCESS Web for an article on how to have textboxes autofill in after you make a selection in a combo box; you'll want to use the one that uses code to put the values into the boxes, because you'll want to bind the textboxes to the fields in the tblOrder table and you want the ability to modify those values: http://www.mvps.org/access/forms/frm0058.htm Post back if you need more info. -- Ken Snell MS ACCESS MVP "ROB" wrote in message ... tblOrder; Hauler Name, Contact, Phone #, Project, Job #, PO#, Freight Rate, Dump Fee, Prevailing Wage TblHauler; Hauler Name, Hauler #, Contact, Phone #, frmOrder; Hauler Name, Contact, Phone #, Project, Job #, PO#, Freight Rate, Dump Fee, Prevailing Wage I use frmOrder to input my data to tblOrder. In tblHauler I have several Hauler names, but only 1 contact name and number assigned to each Hauler. When using frmOrder I would like to select a Hauler name from my combo box, and would like contact & phone # to fill in the corresponding cells on my form, however I want the ability to type over the contact & phone # fields in the event that there may be a temporary change in that information for a particular order. "Ken Snell [MVP]" wrote: THERE IS NO NEED TO SHOUT.... You cannot do this in a table, but you can do it on a form that has a subform(s) based on the other tables. But you'll need to give us more info about your specific setup. -- Ken Snell MS ACCESS MVP "ROB" wrote in message ... TABLE1 HAS SEVERAL FIELDS, ONE OF WHICH CURRENTLY HAS A COMBO BOX DISPLAYING INFORMATION BASED FROM A FIELD IN TABLE 2. UPON SELECTING AN ENTRY FROM THE COMBO BOX, I WOULD LIKE TO AUTO POPULATE THREE ADDITION FIELDS IN TABLE1, TO MATCH THEIR CORROSPONDING FIELDS IN TABLE2. I HOPE THIS MAKES SENSE, AND THAT SOMEONE CAN ASSIST/DIRECT ME THANKS |
#12
|
|||
|
|||
OK - no need for a subform after all, now that I see your setup.
On your frmOrder, you want to use a combo box for the Hauler Name values. Use a query as the Row Source for this combo box. The query should obtain the Hauler Name, Hauler #, Contact, and Phone # fields. Then see The ACCESS Web for an article on how to have textboxes autofill in after you make a selection in a combo box; you'll want to use the one that uses code to put the values into the boxes, because you'll want to bind the textboxes to the fields in the tblOrder table and you want the ability to modify those values: http://www.mvps.org/access/forms/frm0058.htm Post back if you need more info. -- Ken Snell MS ACCESS MVP "ROB" wrote in message ... tblOrder; Hauler Name, Contact, Phone #, Project, Job #, PO#, Freight Rate, Dump Fee, Prevailing Wage TblHauler; Hauler Name, Hauler #, Contact, Phone #, frmOrder; Hauler Name, Contact, Phone #, Project, Job #, PO#, Freight Rate, Dump Fee, Prevailing Wage I use frmOrder to input my data to tblOrder. In tblHauler I have several Hauler names, but only 1 contact name and number assigned to each Hauler. When using frmOrder I would like to select a Hauler name from my combo box, and would like contact & phone # to fill in the corresponding cells on my form, however I want the ability to type over the contact & phone # fields in the event that there may be a temporary change in that information for a particular order. "Ken Snell [MVP]" wrote: THERE IS NO NEED TO SHOUT.... You cannot do this in a table, but you can do it on a form that has a subform(s) based on the other tables. But you'll need to give us more info about your specific setup. -- Ken Snell MS ACCESS MVP "ROB" wrote in message ... TABLE1 HAS SEVERAL FIELDS, ONE OF WHICH CURRENTLY HAS A COMBO BOX DISPLAYING INFORMATION BASED FROM A FIELD IN TABLE 2. UPON SELECTING AN ENTRY FROM THE COMBO BOX, I WOULD LIKE TO AUTO POPULATE THREE ADDITION FIELDS IN TABLE1, TO MATCH THEIR CORROSPONDING FIELDS IN TABLE2. I HOPE THIS MAKES SENSE, AND THAT SOMEONE CAN ASSIST/DIRECT ME THANKS |
#13
|
|||
|
|||
OK - if you haven't figured it out yet I am new to Access, VB and this forum.
I reviewed the article you referenced and created the hypothetical situation. Works great this is exactly what I am after. However I can't seem to figure out how to add the additional steps to the code so that each textbox receives a value from the appropriate column number of the combo box. (Bound textbox example) "Ken Snell [MVP]" wrote: OK - no need for a subform after all, now that I see your setup. On your frmOrder, you want to use a combo box for the Hauler Name values. Use a query as the Row Source for this combo box. The query should obtain the Hauler Name, Hauler #, Contact, and Phone # fields. Then see The ACCESS Web for an article on how to have textboxes autofill in after you make a selection in a combo box; you'll want to use the one that uses code to put the values into the boxes, because you'll want to bind the textboxes to the fields in the tblOrder table and you want the ability to modify those values: http://www.mvps.org/access/forms/frm0058.htm Post back if you need more info. -- Ken Snell MS ACCESS MVP "ROB" wrote in message ... tblOrder; Hauler Name, Contact, Phone #, Project, Job #, PO#, Freight Rate, Dump Fee, Prevailing Wage TblHauler; Hauler Name, Hauler #, Contact, Phone #, frmOrder; Hauler Name, Contact, Phone #, Project, Job #, PO#, Freight Rate, Dump Fee, Prevailing Wage I use frmOrder to input my data to tblOrder. In tblHauler I have several Hauler names, but only 1 contact name and number assigned to each Hauler. When using frmOrder I would like to select a Hauler name from my combo box, and would like contact & phone # to fill in the corresponding cells on my form, however I want the ability to type over the contact & phone # fields in the event that there may be a temporary change in that information for a particular order. "Ken Snell [MVP]" wrote: THERE IS NO NEED TO SHOUT.... You cannot do this in a table, but you can do it on a form that has a subform(s) based on the other tables. But you'll need to give us more info about your specific setup. -- Ken Snell MS ACCESS MVP "ROB" wrote in message ... TABLE1 HAS SEVERAL FIELDS, ONE OF WHICH CURRENTLY HAS A COMBO BOX DISPLAYING INFORMATION BASED FROM A FIELD IN TABLE 2. UPON SELECTING AN ENTRY FROM THE COMBO BOX, I WOULD LIKE TO AUTO POPULATE THREE ADDITION FIELDS IN TABLE1, TO MATCH THEIR CORROSPONDING FIELDS IN TABLE2. I HOPE THIS MAKES SENSE, AND THAT SOMEONE CAN ASSIST/DIRECT ME THANKS |
#14
|
|||
|
|||
Give me a bit more to go on... what code and form controls have you put
together so far, and what (in words) do you want to do yet? -- Ken Snell MS ACCESS MVP "ROB" wrote in message ... OK - if you haven't figured it out yet I am new to Access, VB and this forum. I reviewed the article you referenced and created the hypothetical situation. Works great this is exactly what I am after. However I can't seem to figure out how to add the additional steps to the code so that each textbox receives a value from the appropriate column number of the combo box. (Bound textbox example) "Ken Snell [MVP]" wrote: OK - no need for a subform after all, now that I see your setup. On your frmOrder, you want to use a combo box for the Hauler Name values. Use a query as the Row Source for this combo box. The query should obtain the Hauler Name, Hauler #, Contact, and Phone # fields. Then see The ACCESS Web for an article on how to have textboxes autofill in after you make a selection in a combo box; you'll want to use the one that uses code to put the values into the boxes, because you'll want to bind the textboxes to the fields in the tblOrder table and you want the ability to modify those values: http://www.mvps.org/access/forms/frm0058.htm Post back if you need more info. -- Ken Snell MS ACCESS MVP "ROB" wrote in message ... tblOrder; Hauler Name, Contact, Phone #, Project, Job #, PO#, Freight Rate, Dump Fee, Prevailing Wage TblHauler; Hauler Name, Hauler #, Contact, Phone #, frmOrder; Hauler Name, Contact, Phone #, Project, Job #, PO#, Freight Rate, Dump Fee, Prevailing Wage I use frmOrder to input my data to tblOrder. In tblHauler I have several Hauler names, but only 1 contact name and number assigned to each Hauler. When using frmOrder I would like to select a Hauler name from my combo box, and would like contact & phone # to fill in the corresponding cells on my form, however I want the ability to type over the contact & phone # fields in the event that there may be a temporary change in that information for a particular order. "Ken Snell [MVP]" wrote: THERE IS NO NEED TO SHOUT.... You cannot do this in a table, but you can do it on a form that has a subform(s) based on the other tables. But you'll need to give us more info about your specific setup. -- Ken Snell MS ACCESS MVP "ROB" wrote in message ... TABLE1 HAS SEVERAL FIELDS, ONE OF WHICH CURRENTLY HAS A COMBO BOX DISPLAYING INFORMATION BASED FROM A FIELD IN TABLE 2. UPON SELECTING AN ENTRY FROM THE COMBO BOX, I WOULD LIKE TO AUTO POPULATE THREE ADDITION FIELDS IN TABLE1, TO MATCH THEIR CORROSPONDING FIELDS IN TABLE2. I HOPE THIS MAKES SENSE, AND THAT SOMEONE CAN ASSIST/DIRECT ME THANKS |
#15
|
|||
|
|||
I would like to select an ID number from cboPersonID and populate the
FirstName, MiddleName & LastName fields on the form with data from tblPersons. Currently I can only populate one field. (FirstName or MiddleName or LastName). I know this is a bad example. It’s just a quick DB to learn how to perform this function, it has no other purpose. FrmNewPersons (for data input to tblNewPersons) cboPersonID Bound Column…1 Column Count…4 Column Widths…1”;0” Row Source Type…Table/Query Row Source…SELECT [tblPersons].[ID], [tblPersons].[FirstName], [tblPersons].[MiddleName], [tblPersons].[LastName] FROM tblPersons; After Update… Private Sub cboPersonID_AfterUpdate() Me.FirstName.Value = Me.cboPersonID.Column(1) End Sub TextBox1… FirstName TextBox2… MiddleName TextBox3… LastName TblPersons; ID, FirstName, MiddleName, LastName TblNewPersons; ID, FirstName, MiddleName, LastName |
#16
|
|||
|
|||
I would like to select an ID number from cboPersonID and populate the
FirstName, MiddleName & LastName fields on the form with data from tblPersons. Currently I can only populate one field. (FirstName or MiddleName or LastName). I know this is a bad example. It’s just a quick DB to learn how to perform this function, it has no other purpose. FrmNewPersons (for data input to tblNewPersons) cboPersonID Bound Column…1 Column Count…4 Column Widths…1”;0” Row Source Type…Table/Query Row Source…SELECT [tblPersons].[ID], [tblPersons].[FirstName], [tblPersons].[MiddleName], [tblPersons].[LastName] FROM tblPersons; After Update… Private Sub cboPersonID_AfterUpdate() Me.FirstName.Value = Me.cboPersonID.Column(1) End Sub TextBox1… FirstName TextBox2… MiddleName TextBox3…LastName TblPersons; ID, FirstName, MiddleName, LastName TblNewPersons; ID, FirstName, MiddleName, LastName |
#17
|
|||
|
|||
You just need to add additional code steps for the other textboxes:
Private Sub cboPersonID_AfterUpdate() Me.FirstName.Value = Me.cboPersonID.Column(1) Me.MiddleName.Value = Me.cboPersonID.Column(2) Me.LastName.Value = Me.cboPersonID.Column(3) End Sub -- Ken Snell MS ACCESS MVP "ROB" wrote in message ... I would like to select an ID number from cboPersonID and populate the FirstName, MiddleName & LastName fields on the form with data from tblPersons. Currently I can only populate one field. (FirstName or MiddleName or LastName). I know this is a bad example. It's just a quick DB to learn how to perform this function, it has no other purpose. FrmNewPersons (for data input to tblNewPersons) cboPersonID Bound Column.1 Column Count.4 Column Widths.1";0" Row Source Type.Table/Query Row Source.SELECT [tblPersons].[ID], [tblPersons].[FirstName], [tblPersons].[MiddleName], [tblPersons].[LastName] FROM tblPersons; After Update. Private Sub cboPersonID_AfterUpdate() Me.FirstName.Value = Me.cboPersonID.Column(1) End Sub TextBox1. FirstName TextBox2. MiddleName TextBox3.LastName TblPersons; ID, FirstName, MiddleName, LastName TblNewPersons; ID, FirstName, MiddleName, LastName |
#18
|
|||
|
|||
Thank you.
"ROB" wrote: I would like to select an ID number from cboPersonID and populate the FirstName, MiddleName & LastName fields on the form with data from tblPersons. Currently I can only populate one field. (FirstName or MiddleName or LastName). I know this is a bad example. It’s just a quick DB to learn how to perform this function, it has no other purpose. FrmNewPersons (for data input to tblNewPersons) cboPersonID Bound Column…1 Column Count…4 Column Widths…1”;0” Row Source Type…Table/Query Row Source…SELECT [tblPersons].[ID], [tblPersons].[FirstName], [tblPersons].[MiddleName], [tblPersons].[LastName] FROM tblPersons; After Update… Private Sub cboPersonID_AfterUpdate() Me.FirstName.Value = Me.cboPersonID.Column(1) End Sub TextBox1… FirstName TextBox2… MiddleName TextBox3…LastName TblPersons; ID, FirstName, MiddleName, LastName TblNewPersons; ID, FirstName, MiddleName, LastName |
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Accessing a databse thru a webpage (newbie question) | Chang | General Discussion | 1 | August 23rd, 2004 09:10 AM |
Data from Excel to Access | Database Design | 2 | August 20th, 2004 12:53 PM | |
Useless Access 2003 | tired, angry, sucidial and bored | General Discussion | 10 | July 21st, 2004 11:52 PM |
You do not have exclusive access... ERROR | Robin | General Discussion | 1 | July 6th, 2004 01:18 AM |
Recommendations needed for installation order of Access XP, Access XP runtime, ... | Mark Plantenberg | Setup, Installing & Configuration | 0 | June 11th, 2004 11:22 PM |