Re: Auto fill fields

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: AlCamp (anon_at_anon.net)
Date: 11/11/04


Date: Thu, 11 Nov 2004 17:19:14 -0500

Brent,
   So... CompanyNo should be "related" to Program...
   In the query behind your combo box, place the CompanyNo in the 2nd
column. Then, when a user selects a Program from the combo (using the combo
AfterUpdate event), run this code...
      [Company] = YourComboName.Column(1)
   Combo columns are numbered 0,1,2, etc.. so the 2nd column with the
ComanyNo is .column(1).
hth
Al Camp

"Brent" <Brent@discussions.microsoft.com> wrote in message
news:802F85FB-2575-44DF-A93F-A01D190E1026@microsoft.com...
>I need a textbox to auto fill based on what is selected in a combo box. My
> combo box is called Program and my textbox is called Company. Each
> Program
> has a specific company number. When a program is selected in the combo
> box I
> need the company text box to auto fill with its related company number. I
> have read the other posts and still cant get it to work. It would be the
> same to me if I could do this in the table instead of on the form. Either
> way, I just need the company number to end up in the table and don't want
> to
> have to enter it over and over when I am already entering Programs.
> Thanks
> in advance for any help.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.791 / Virus Database: 535 - Release Date: 11/8/2004 


Relevant Pages

  • Re: Auto fill fields
    ... "AlCamp" wrote: ... > In the query behind your combo box, place the CompanyNo in the 2nd ... >>I need a textbox to auto fill based on what is selected in a combo box. ... >> need the company text box to auto fill with its related company number. ...
    (microsoft.public.access.forms)
  • Auto fill fields
    ... I need a textbox to auto fill based on what is selected in a combo box. ... have read the other posts and still cant get it to work. ... have to enter it over and over when I am already entering Programs. ...
    (microsoft.public.access.forms)
  • RE: Link a text box to combo boxes on a form.
    ... here is what I put in the Control Source section of the Textbox window in the ... Estimate being the field items I need displayed in the textbox (as a project ... Shell & Motiva being the query that contains the field mentioned above that ... Then create a subform based on the ProjectEstimate ...
    (microsoft.public.access.forms)
  • Re: SQL Speed
    ... As I read your query, you want the records from two tables for the name ... filled in in the textbox. ... SELECT iPK, At) AS nOccurs FROM Noms INTO CURSOR ...
    (microsoft.public.fox.vfp.queries-sql)
  • Re: selecting a single record from a form
    ... I have the textbox on the form for input - figured that out. ... You need an unbound text box for the user to type in their "TagNo" value. ... this query based on the Tag no that the user inputs into a textbox. ... contains the value in the record you want to display. ...
    (microsoft.public.access.formscoding)