A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Search combo box, fill form



 
 
Thread Tools Display Modes
  #1  
Old July 10th, 2004, 02:28 PM
DWPhillips
external usenet poster
 
Posts: n/a
Default Search combo box, fill form

I have a form in which I have a combo box perform a query and list only records I want to have available in that perticular form. I want to choose form this combo box and have my form be filled with the information from the chosen record. I can't seem to accomplish this. Can you help?
  #2  
Old July 10th, 2004, 04:14 PM
Gerald Stanley
external usenet poster
 
Posts: n/a
Default Search combo box, fill form

The usual practice is to have the combo's RowSource SQL
bring back all the columns that you wish to use on the form
then to code its AfterUpdate eventhandler to populate the
other controls on the Form. You will need to change the
column count to match the number of columns returned and to
set the column widths to suit your taste (usually all but
the first column is set to 0). To reference the data in
the other columns you use the combo's Column (zero-based)
collection. So the code in the AfrterUpdate eventhandler
would look something like

txtBoxA.Value = combo1.Column(1)
txtBoxB.Value = combo2.Column(2)
etc

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
I have a form in which I have a combo box perform a query

and list only records I want to have available in that
perticular form. I want to choose form this combo box and
have my form be filled with the information from the chosen
record. I can't seem to accomplish this. Can you help?
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
auto entry into second table after update Tony New Users 13 July 9th, 2004 10:42 PM
Fill In Form Maribeth New Users 2 July 2nd, 2004 07:44 PM
Design questions Bruce Database Design 15 June 19th, 2004 12:12 AM
Requery Combobox MJ Running & Setting Up Queries 7 May 25th, 2004 11:01 AM
Form Doesn't Go To New Record Steve New Users 15 May 16th, 2004 04:33 PM


All times are GMT +1. The time now is 12:46 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.