Tables VBA Code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jollywg
    New Member
    • Mar 2008
    • 158

    #1

    Tables VBA Code

    I've got two tables tblPatient and tblIV. I have the PatientWeight in tblPatient, PatientAge in qryCalcPatientA ge, and IJEE in tblIV. What i am needing to do is get the weight and age from the table and multiply them together to get the IJEE. I'm using VBA is it possible?!? if not how would I go about doing this?
    Thanks for input

    Matt
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Hi, Matt.

    Looks like you want to join [tblPatient] and [tblIV] on [IJEE].

    [code=sql]
    SELECT ... FROM tblPatient INNER JOIN tblIV ON DateDiff("yyyy" , tblPatient.Pati entAge, Date())*tblPati ent.PatientWeig ht = tblIV.IJEE;
    [/code]

    The query above will combine records for exact match of PatientAge*Pati entWeight and IJEE. Though it may be modified to return record combinations with approximate match.

    Regards,
    Fish

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32669

      #3
      Please visit this thread to see why we would rather you didn't double-post (Please do Not Double Post).

      I won't make this an official warning for now, but I'd be grateful if you ensured I never have to ;)

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32669

        #4
        For interested parties (the two threads would be messed up if simply merged) the other thread is Pull info from two tables and and a query.

        Comment

        Working...