I just attatched it because im sure my logic is mostly screwy but the issue im having is at the very bottom of the code on the info entry form it looks liek this:
Private Sub Weight_AfterUpdate()
Dim agebracket As String
Dim age As Integer
'calculate age
age = DateDiff("yyyy", Me![DOB], Date) - IIf(Format$(Date, "mmdd") < Format$(Me![DOB], "mmdd"), 1, 0)
' HEY MACARENA!!!!!
Me![age now] = age
'calculate bracket
If age >= 17 And age < 21 Then
If Me![male female] = "MALE" Then
agebracket = "male age bracket 17 to 20"
Else
agebracket = "female age bracket 17 to 20"
End If
Else
If age >= 21 And age < 27 Then
If Me![male or female] = "MALE" Then
agebracket = "male age bracket 21 to 27"
Else
agebracket = "female age bracket 21 to 27"
End If
Else
If age >= 28 And age < 39 Then
If Me![male or female] = "MALE" Then
agebracket = "male age bracket 28 to 39"
Else
agebracket = "female age bracket 28 to 39"
End If
Else
If age >= 40 Then
If Me![male or female] = "MALE" Then
agebracket = "male age bracket 40 plus"
Else
agebracket = "female age bracket 40 plus"
End If
End If
End If
End If
End If
Me![agebracketpull] = agebracket
Me![max weight] = DLookup("&Me![agebracketpull]&", "[height weight table]", "[height] =", " & Me![Height] & ")
End Sub
so as you can see the [agebracketpull] is a string variabel not the actual name of the field on the table... the string in it is the field on the table however. and hight is a number not text but my fields on the table are also number.