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 |
#1
|
|||
|
|||
unbound combo box
I am trying to get an unbound combo box called InmateSelect to lookup and
select data from my primary table called Downinfo. My table fields are CDCnum, InmateName, and InmateHousing and all are text, no numeric value. Can someone help me with a code to display all three columns in the combo box and select the data to be displayed and edited. I want to query the selected data and print reports. Please Help Ducat Assingment |
#2
|
|||
|
|||
unbound combo box
"ducat assignment" wrote in
message ... I am trying to get an unbound combo box called InmateSelect to lookup and select data from my primary table called Downinfo. My table fields are CDCnum, InmateName, and InmateHousing and all are text, no numeric value. Can someone help me with a code to display all three columns in the combo box and select the data to be displayed and edited. I want to query the selected data and print reports. Please Help Ducat Assingment You don't need any code. Go to your combo box properties and use the query builder to select your three fields. Next, set the column count to 3 and set the column widths, then set the bound column. That will display all 3 data elements in "drop-down" mode and the bound data element in "normal" mode. HTH - Keith. www.keithwilby.com |
#3
|
|||
|
|||
unbound combo box
When I used that method, all three fields were visible and the CDCnum could
be selected and queried but the next two fields InmateName and InmateHousing were blank (null) or the incorrect record was edited selected when queried. The CDCnum and other added data was correct but the InmateName and InmateHousing field were wrong. According to the books and other support suggestions, I need an unbound combo box and three bound text boxes to make this work. I need to edit/add data to the selected recorded and that did not work using this method. Any other Ideas? This is what I have so far. I cannot get the first field, which is CDCnum (text) to display so I could select it. Option Compare Database Option Explicit Private Sub Form_Open(Cancel As Integer) Inmate_Select.RowSourceType = "Table/Query" Inmate_Select.RowSource = "DOWNINFO" Inmate_Select.ColumnCount = 3 Inmate_Select.ColumnWidths = "0" End Sub Private Sub Inmate_Select_Click() Dim strSQL As String strSQL = "Select * FROM CDCnum " & _ "Where CDCnum = " & Inmate_Select.Column(1) Debug.Print strSQL Forms!Inmates.RecordSource = "&&&&&&&" End Sub Thanks for any help "Keith Wilby" wrote: "ducat assignment" wrote in message ... I am trying to get an unbound combo box called InmateSelect to lookup and select data from my primary table called Downinfo. My table fields are CDCnum, InmateName, and InmateHousing and all are text, no numeric value. Can someone help me with a code to display all three columns in the combo box and select the data to be displayed and edited. I want to query the selected data and print reports. Please Help Ducat Assingment You don't need any code. Go to your combo box properties and use the query builder to select your three fields. Next, set the column count to 3 and set the column widths, then set the bound column. That will display all 3 data elements in "drop-down" mode and the bound data element in "normal" mode. HTH - Keith. www.keithwilby.com |
Thread Tools | |
Display Modes | |
|
|