WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Inspections and Treatments

 
Goto page Previous  1, 2, 3
   Home -> Office other -> Table Design RSS
Next:  how to .mbd able to accept mupltiple users and co..  
Author Message
tina

External


Since: Mar 23, 2004
Posts: 2610



(Msg. 17) Posted: Thu Oct 09, 2008 12:47 pm
Post subject: Re: Inspections and Treatments [Login to view extended thread Info.]
Archived from groups: microsoft>public>access>tablesdbdesign (more info?)

a control's ControlSource property setting determines which field in the
*form's* RecordSource is bound to that particular control. for example, when
control Text1's ControlSource property is set to FieldA, then when you open
the form, go to any particular record, or to a new record, and enter a value
in control Text1, the value will be stored in FieldA in that record, in the
form's underlying table.

a combo box control's BoundColumn property determines which field in the
control's RowSource will be used as the *value* of the control, when a
droplist selection is made. in turn, that value will be stored in the field
set as the control's ControlSource; or, if the control is unbound
(ControlSource is blank), that value will be held by the control until it is
changed by the user or the form is closed.

when you use a combo box control to choose from a list of employees, for
example, the control's RowSource will be fields from tblEmployees,
including:
1.the primary key field - which must be the bound column of the control,
normally i make it the first column (which is column zero (0), because the
combobox column index is zero-based).
2. the employee name fields (usually you'll want to concatenate these into a
single name field, such as EmpName: Lname & ", " & Fname
3. *any other fields that contain data you will want to display/use in the
form*

use the ColumnWidths property to set the width of the first column (column
0) to 0". you don't want the user to see the primary key value of the
employee record chosen from the combobox droplist.

set the width of the second column (column 1) to, say, 2", wide enough to
display most lastname, firstname combinations. so what shows in the
droplist, and what will show in the combobox control after a selection is
made from the droplist, will be a name.

usually, you set the column widths of any additional columns to 0". depends
on what information the user needs to see when s/he is making a selection
from the droplist.

regardless of the column width setting, the data in all columns of the
RowSource are available to be utilized in the form. the values in those
columns can be selectively displayed in unbound controls in the form, or
used in calculations in the form or in VBA - pretty much however you need to
use them, while the form's open. so if the RowSource of cboEmployee is set
to
SELECT EmpID, Lname & ", " & Fname As Emp, DOB FROM tblEmployees ORDER BY
Lname, Fname;
and the ColumnWidths property is set the
0", 2", 0"
then the user sees only the employee name in the droplist and in the control
after a selection is made.
and you can set the ControlSource of a textbox to
= cboEmployee.Column(2)
so the textbox displays the DOB value of the employee chosen in cboEmployee.

and btw, i have to bow out of this thread now, i won't be back in the
newsgroups for a few weeks. for further specific questions about combo box
controls, suggest you google the newsgroups and/or start a new thread in
microsoft.public.access.forms

hth


"Fred" <Fred.RemoveThis@discussions.microsoft.com> wrote in message
news:14E4A459-8A51-4365-9586-6E80E4F2364F@microsoft.com...
> Tina,
>
> Thank you again. I read all of those that you recommended (plus
> ControlSource) and experimented with them, and it was very informative.
> I'm still stuck at the same place, albiet with greater knowledge. Using
> JamesFreddyC's inquiry as an example, let's say that the record source for
a
> form is tblWork, and we desire to show the address of the customer that
the
> work was for. I think that you said that a combo box is good way to do
this.
>
>
> I found the BoundColumn and ControlSource help files confusing, I think
it
> was because I couldn't find the "needle" of what these basically are in
the
> general-case "haystack" of the help text.
>
> But all of those properties seem to just set what show when the user is
> actively using the dropdown arrow....I can get that to work fine. My
> problem is how to control what shows when nobody is doing anything with
the
> combo box. The ControlSource property seems to determine this.
However,
> it has a dropdown list which is just the fields of the RecordSource of the
> Form, and I can't get it to take anything related to the related table
that
> is the source of the combo box.
>
> E.G. so how would one make the address of the customer show in the combo
box
> when nobody is clicking on the combo box?
>
> Thanks Again.
>
> Sincerely,
>
>
> Fred
>
>
>
Back to top
Login to vote
Fred

External


Since: Jun 26, 2006
Posts: 496



(Msg. 18) Posted: Thu Oct 09, 2008 12:47 pm
Post subject: Re: Inspections and Treatments [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hello Tine,

I hope that I got this quick big THANK YOU in before you bowed out of the
thread.

Sincerely,

Fred
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> Table Design All times are: Eastern Time (US & Canada) (change)
Goto page Previous  1, 2, 3
Page 3 of 3

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET