Results 1 to 2 of 2
  1. #1
    kamu is offline Novice
    Windows Vista Access 2002 (version 10.0)
    Join Date
    May 2009
    Posts
    1

    generating a new variable with combination input


    Hello all,
    Iam newbie here and access.I have problem of creating field which will take input from three other fields.
    e.g studNo= (AI default) + RegNo + PGroup,
    and it updates automatic.
    so how can I write such in VBA?

    Thank you for your help
    mk

  2. #2
    ansentry's Avatar
    ansentry is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    67
    Base your form on a query and add the following to a new column in the query.

    Code:
    StudNo: [A1Default] & " " & [RegNo] & " " & [PGroup]
    Now open you form in design view, drag "StudNo" from the field list to your form,then save it when you open the form it will display the result you wanted.

    If you don't want the spacing between the fields then do this;

    Code:
    StudNo: [A1Default] & "" & [RegNo] & "" & [PGroup]
    Regards,

    John A

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

Similar Threads

  1. Prevent Duplicate Values on Combination of Two Fields
    By LornaM in forum Database Design
    Replies: 8
    Last Post: 05-05-2009, 11:16 PM
  2. Variable Criteria
    By JamesLens in forum Queries
    Replies: 0
    Last Post: 01-02-2009, 04:55 PM
  3. noob prob, generating next report
    By flash319 in forum Reports
    Replies: 2
    Last Post: 08-04-2008, 03:10 PM
  4. Replies: 2
    Last Post: 09-01-2006, 04:03 PM
  5. generating random numbers on form
    By anitra in forum Forms
    Replies: 1
    Last Post: 02-14-2006, 10:08 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