Results 1 to 4 of 4
  1. #1
    zul is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Aug 2011
    Posts
    4

    public variables

    Hi,
    I created two forms to fill up data into two different tables. From the first form i created a public variable and copied data input as say "customer name" in it to hold it and pass it to the next form. Unfortunately when entering the next form i assigned an entry field with the variable contents it's not working. The customer name filed would be acting as a link field.



    Thanks for support.

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    You can try this to open your new form:

    Code:
     
    DoCmd.OpenForm "YourNextFormName", , , "FieldNameOnNextForm = '" & YourPublicVariable & "'"

  3. #3
    zul is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Aug 2011
    Posts
    4

    Thanks Robeen

    Will try it out, if you can help me out with another issue!
    I need to implement a database on client. I wish upon entry for a client name lookup if it already exist.
    Thanks

  4. #4
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Zul - best open a new thread for the new topic. More people will look at it.

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

Similar Threads

  1. Using Public variables between forms/queries/reports
    By dcrake in forum Sample Databases
    Replies: 2
    Last Post: 12-25-2015, 05:44 PM
  2. Creating/Using Public Subs
    By sparlaman in forum Programming
    Replies: 3
    Last Post: 05-19-2011, 03:29 PM
  3. VBA public procedure in a form
    By gg80 in forum Programming
    Replies: 3
    Last Post: 09-12-2010, 04:55 AM
  4. Public Terminal Emulation
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-31-2010, 02:09 AM
  5. public instead of dim not working
    By DKY in forum Access
    Replies: 1
    Last Post: 10-14-2008, 11:42 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