Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search Form - how to enlarge columns in results list

Status
Not open for further replies.

kysterathome

Technical User
Dec 22, 2004
37
LU
Hi all,

I have received this search form from a very nice user


but I have two questions about it:

1. I would like the columns in the results list box to be bigger to reflect the size of the results - what code do I add?

2. What code do I add to make the form close down after I have double-clicked a name in the results list?

hmmm... too many questions?

I would appreciate any help you can provide me with.

Kysterathome
 
I don't think forum users should be expected to download and install a file. We don't know you or the source of the zip file. Others who read your question may decide otherwise or have faith the file isn't a virus and have the time to do all of this.

Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
 
I appologise should I have gone too far with my questions. I couldn't think of a better way of showing my problem.

As for your statement "the time to do all this" - my understanding is that nobody is obliged to help out.

I will think of your point for the future.

Thank you anyway,
Kysterathome
 
I read through that thread a couple times.

If you are looking for a way for users to
-select fields, criteria, sorting, grouping, etc from one of multiple "data source" queries
-save, retrieve, and modify "reports"
-send results to Print, CSV, Excel, Word table, Word Merge, Form Letter Report, Graph,...
-share reports
-build the system in less than 30 minutes

Consider the query by form applet at I import this "applet" into almost every database application that I create.

Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
 
Thank you very much for the link!

I will study it in more detail.

Kysterathome
 
That's exactly the database, now, how do I increase the size of the columns in the results list? I have tried entering some codes myself, but then nothing workied anymore ...

Kysterathome

 
I believe width of the columns you required to change

Set the column widths of the listbox while you are inthe Design ViewChange the [purple]Column Widths[/purple] of the ListBox while you are in the design view of the frmSearchForm
Bring Properties of the listbox
Change [purple]Column Width[/purple]
Code:
0";1";1";1";0.5"
to something like
Code:
0";2";2";2";1"

Also change the Width [Blue]4"[/blue]to [Blue]8"[/blue] to double it.
If you want more records to be displayed then increase the height also

Zameer Abdulla
Visit Me
 
Jeezz, can't believe I didn't even look at the list properties!?! ...[3eyes]

But say, ZmrAbdulla, any idea what to do to make the form close down after double clicking the result in the list?

VERY grateful!

Kysterathome
 
Change this code
Code:
Private Sub lstCustInfo_DblClick(Cancel As Integer)
'Open frmCustomer based on the ID from lstCustInfo listbox
DoCmd.OpenForm "frmCustomer", , , "[ID] = " & Me.lstCustInfo , , acDialog
End Sub
to
Code:
Private Sub lstCustInfo_DblClick(Cancel As Integer)
'Open frmCustomer based on the ID from lstCustInfo listbox
DoCmd.OpenForm "frmCustomer", , , "[ID] = " & Me.lstCustInfo 
DoCmd.Close acForm, "frmSearchForm"
End Sub
See , , acDialog removed and added
DoCmd.Close acForm, "frmSearchForm"

regards

Zameer Abdulla
Visit Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top