Results 1 to 2 of 2
  1. #1
    archiwill is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Jan 2013
    Location
    London, UK
    Posts
    1

    Lightbulb Please help with my MACRO problem

    Hi everyone,
    thanks for having a look at my problem. This is my first post so I hope I'm clear in explaining this.

    I have 2 tables and a form.
    Table1 = master
    Table2 = subtable

    There are 3 parts to this;
    1.
    I want to compare two fields to automatically input into a third field.
    For example if FIELD A = FIELD B(+/-1), then FIELD C 'yes', 'no'

    2.
    There are 16 rows in which I would like this to work.
    If 5 or more of these rows have 'no' in FIELD C, then I would like that the 'no' entries are highlighted red.



    3.
    FIELD B is a list of entries in Table2 and at the moment I am only able to see them on the form (and in Table2). Do I need to find a way to autopoulate the selected entry into the Table1 entry for this comparison or can I do it with the FIELD B info on in Table2?
    The entries in Table2 can relate one-to-many.

    I've been looking for a wee while for ways to do this and haven't gotten very far. I've been looking at writing a Macro to do this. I think this is the best way? I found something online about using SETFIELD but the option doesn't come up on my computer.

    Thanks for taking the time

    Will

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    1. Saving data dependent on other data is usually a bad idea. Calculate the value when needed. This can be in a query or in textbox on form or report.

    2. What do you mean there are 16 rows? Why are there only 16 rows?
    Use textbox ConditionalFormatting on form or report.

    3. FIELD A and FIELD B are both in subform?

    Want to provide db for analysis? Follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Problem creating hyperlink to a sub macro
    By AccessOAP in forum Programming
    Replies: 2
    Last Post: 08-15-2011, 08:05 AM
  2. Macro Form problem
    By pippa in forum Forms
    Replies: 0
    Last Post: 04-06-2011, 04:44 AM
  3. Problem with SetValue Macro on Form
    By Accidental DBA in forum Forms
    Replies: 3
    Last Post: 04-01-2011, 01:48 PM
  4. active X macro problem
    By stryder09 in forum Access
    Replies: 4
    Last Post: 02-28-2011, 12:13 PM
  5. Macro problem
    By HelenP in forum Forms
    Replies: 3
    Last Post: 10-29-2010, 06:24 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums