473,324 Members | 2,193 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,324 software developers and data experts.

Hiding a Column in a search box

In a form I have a list box which displays the results of a search. The results are in 4 columns. The end user doesn't want to see the first column which has the ID number, but it is needed in the recordset in order to do the necessary search by this unique identifier. Is there a way to just hide the first column from sight? I have tried the properties ColumnsHidden and ColumnWidths, but with no luck. Here is the code:
Expand|Select|Wrap|Line Numbers
  1. lstSearchResults.RowSource = "Value List"
  2.         lstSearchResults.ColumnCount = 4
  3.         lstSearchResults.RowSource = "Customer ID; First Name; Last Name; Distributor"
  4.  
  5.  
  6.         While (Not rs.EOF)
  7.             Dim row As String
  8.             Set rs4 = dbs.OpenRecordset("SELECT D_Name FROM Dist2 WHERE Dist_ID = " & rs(5))
  9.             row = rs(0) & ";" & rs(1) & ";" & rs(2) & ";" & rs4(0)
  10.             lstSearchResults.AddItem (row)
  11.             rs.MoveNext
  12.         Wend
And here is the code for the needed search
Expand|Select|Wrap|Line Numbers
  1. Private Sub lstSearchResults_Click()
  2. DoCmd.OpenForm "Current_Customer_Data", , , "[Call_ID] = " & Me.lstSearchResults.Column(0)
End Sub
Apr 1 '07 #1
1 1017
Rabbit
12,516 Expert Mod 8TB
You're looking for the Column Widths property of the listbox. Set a column to 0 width and that will hide it.
Apr 1 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Wiebke Pätzold | last post by:
Hi all! I create a database that contains a table. 'Nachname' is one of 13 column names. This program can search for a special letter. In my example it is 'ra'. and the search takes place in...
38
by: | last post by:
I have a script... ----- <SCRIPT language="JavaScript" type="text/javascript"> <!-- function makeArray() { for (i = 0; i<makeArray.arguments.length; i++) this = makeArray.arguments; } ...
1
by: Amber | last post by:
The DataGrid allows you to make columns visible or invisible on demand - even edit and other special columns. This article will show you how it is done. Some developers have reported problems...
5
by: Rich | last post by:
I have a datagrid that uses a dataview object for its datasource. The dataview contains a unique row identifier column. I don't want to display this column in the datagrid. I need the unique row...
1
by: jack | last post by:
Hi all, My datagrid have too many columns which are going out of screen. one of the solution is to group the columns and make only the total column visible at the initial stage. What now i...
4
by: Cheryl | last post by:
Hi! It seems that the listview column does not contain an option called "Hide". Any suggestions to implement such a hiding function excepting setting the column width = 0? Thanks.
2
by: =?Utf-8?B?SmF5IFBvbmR5?= | last post by:
Based on wether a row is selected in a GridView I need to HIDE the last two columns of a gridview. I do NOT need to make the cells invisible I want to hide the entire column. When I set the...
11
by: JJ297 | last post by:
I want to hide the Pin field below in my repeater. How do I do this? <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1"> <ItemTemplate> <tr> <td><font...
3
by: troy_lee | last post by:
How do I suppress the properties box on database startup? Thanks.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.