Results 1 to 3 of 3
  1. #1
    Cheshire101 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    42

    Question VBA loop to check data

    Description:
    I have a field on a sub form that needs data to be in a specific format based on another fields information.
    Example: Main Form(Field)1 needs SubForm(Field) data to be A#A#A#
    Main Form(Field)2 needs SubForm(Field) data to be ######

    Problem: I have the check the accuracy of the data part but what I am missing to how to check the multiple records that exist because the data is on a sub form which is a continuous form.



    I thought I could just add a autonumber and create a loop using the first autonumber generated and the quantity of records.
    ---This would not work because the next autonumber in the table might be taken by another user for another record.

    Any help would be greatly appreciated

  2. #2
    Join Date
    Apr 2011
    Posts
    18
    What you could do is to use the recordsetclone of your subform, and loop through all the records in that recordset.

  3. #3
    Cheshire101 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Posts
    42
    I have used recordsetclone before, but that was just to count the records. Can you please help me with how this can be used for my loop?
    I understand that I could use this to count the records and loop through that number of times, but what would the identifier for the sub record be?

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

Similar Threads

  1. Replies: 0
    Last Post: 04-28-2011, 02:28 AM
  2. Check multiple data
    By carstenhdk in forum Queries
    Replies: 1
    Last Post: 05-05-2010, 10:20 AM
  3. Check multiple data
    By carstenhdk in forum Access
    Replies: 1
    Last Post: 05-05-2010, 10:19 AM
  4. Replies: 9
    Last Post: 04-27-2010, 01:00 PM
  5. Cross check data from 2 sources
    By Zukster in forum Queries
    Replies: 7
    Last Post: 09-22-2009, 10:54 AM

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