Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2002
    Posts
    23

    Unanswered: Storing Queried Data in Variables

    In VBA, is there a way to save a queried value inside a variable (i.e. as a Double) so that in an INSERT statement I can just insert that variable? I already tried using a subquery and that didn't work.

    For example, if I was querying for a dollar amount (56.35) in VBA, I'd like to be able to store that in a variable as a Double if it's possible.

    Any thoughts, let me know.

    Thanks much!

    LMF

  2. #2
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Lightbulb Usual question...

    If you can calculate it at any time, why do you want to STORE it?

    If it is for some sort of evaluation, then you could use a recordset.

    Please post further information:

    Table Defenitions ie

    Table names / Relationships
    Field Names / DataTypes

    Breif description of what you are trying to achieve

    What context this is in - For a report, form or analysis
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  3. #3
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    More information please

    Can you post the table names, the field names and data types, the relationships between the tables and indicate which field you are interested in (not shown on your form).

    Would I be correct in saying that this form is "Unbound"?

    ...Better still - can you zip the .db and upload it?
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •