Simple q: setting the value of one field based on a form selection

From: Dave Linsalata (DaveLinsalata_at_discussions.microsoft.com)
Date: 02/05/05


Date: Sat, 5 Feb 2005 08:05:03 -0800

Hey all,

Newbie to VBA who is struggling along, but I've run into a minor (but
simple) problem. I have a form that lists a number of columns from a table.
One of the columns is uses a lookup function. I want to be able to change
the value of another column based on the first column. Example:

Table:
Col 1 - Shape
Col 2 - Color (lookups to: red, green, blue)
Col 3 - Has color (bool)

Form lists all tables.

User goes to row 1 ("Circle") and changes the blank 'color' field to "Red".
Access then sets 'has color' to "Yes."
**or**
User goes to row 1 ("Circle") and changes the 'color' field from "Red" to
blank.
Access then sets 'has color' to "No."

I've been trying to put (ugly) code in pretty much every event handler field
that seems relevant, but I can't get it going. Any help - even just
guildelines saying "use AfterUpdate and look up help on [codenamehere]"...

Thanks!
Dave



Relevant Pages

  • Re: Listing changes between two lists
    ... >>I have two lists of records in two different worksheets. ... >>are never any records that share duplicate identifier strings. ... >> get it to repeat the lookup function again and again so that it would try ... >> exist in this week's worksheet but did not exist in the older worksheet ...
    (microsoft.public.excel)
  • Re: Listing changes between two lists
    ... There are never any records that share duplicate identifier strings. ... If I just pick any old record and manually type in it's identifer string, I can use the lookup function to go find it in one of these lists and give me all the data from that row. ... I want one list of records that have been removed (those that existed last week but do not exist in this week's worksheet). ...
    (microsoft.public.excel)
  • Listing changes between two lists
    ... I have two lists of records in two different worksheets. ... that share duplicate identifier strings. ... can use the lookup function to go find it in one of these lists and give me ... (those that existed last week but do not exist in this week's worksheet). ...
    (microsoft.public.excel)
  • Re: Creating, Populating and Linking combo boxes Word 2K
    ... Private Sub Document_New ... In the VBA ... When it comes to setting the "secondary" lists, ... graphics and controls as desired. ...
    (microsoft.public.word.vba.general)
  • Re: Creating, Populating and Linking combo boxes Word 2K
    ... Private Sub Document_New ... In the VBA ... graphics and controls as desired. ... I also want to place some VBA controls (specifically, drop down lists ...
    (microsoft.public.word.vba.general)