Results 1 to 2 of 2
  1. #1
    jbh02 is offline Novice
    Windows Vista Access 2007
    Join Date
    Sep 2009
    Posts
    3

    Update from txtbox Help!

    Insert Into Table1 (Field1, Field2) = Select Max(Field1) from Table2 As Expr1, Forms.Form1.txtBox1 As Expr2;



    Basically I am trying to Insert two fields in table1. The first is an aggregate getting the highest number from table2 field. The second one is a value in a txtbox on form1.

    Cannot seem to get this to work together. I usually get an error.

    Any help? I am pretty sure I am not addressing the txtbox correctly.

    The "As Expr" came from my attempts at using the query builder. Not sure if they are needed.

  2. #2
    SoftwareMatters is offline Access VBA Developers
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    What is the error?
    Try this:
    Insert Into Table1 (Field1, Field2) = Select Max(Field1) from Table2 As Expr1, [Forms]![Form1]![txtBox1] As Expr2;

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

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