G
Guest
I am in child development, not software so please forgive if this is absurd.
I am trying to extrct the maximum value from a table and then use it for
another operation. Using what I have in my limited toolbox-of-knowledge, I
created a listbox and used the RowSource property to get the value. What I
don't know is how to now extract the value as an integer. Here's what I've
done:
Dim intKid As Integer
Dim intSchedule As Integer
intKid = Me!KidID
Me!lstCurrSch = "SELECT Max(tblSchedules.SchID) FROM tblKids INNER JOIN
tblSchedules ON (tblKids.KidID = tblSchedules.KidID) AND (tblKids.KidID =
tblSchedules.KidID) AND (tblKids.KidID = tblSchedules.KidID)GROUP BY
tblKids.KidID HAVING (((tblKids.KidID) =" & intKid & "));"
intSchedule = Me!lstCurrSch
<<<<
However, intSchedule resolves as a null value. Help?
Thanks.
I am trying to extrct the maximum value from a table and then use it for
another operation. Using what I have in my limited toolbox-of-knowledge, I
created a listbox and used the RowSource property to get the value. What I
don't know is how to now extract the value as an integer. Here's what I've
done:
Dim intKid As Integer
Dim intSchedule As Integer
intKid = Me!KidID
Me!lstCurrSch = "SELECT Max(tblSchedules.SchID) FROM tblKids INNER JOIN
tblSchedules ON (tblKids.KidID = tblSchedules.KidID) AND (tblKids.KidID =
tblSchedules.KidID) AND (tblKids.KidID = tblSchedules.KidID)GROUP BY
tblKids.KidID HAVING (((tblKids.KidID) =" & intKid & "));"
intSchedule = Me!lstCurrSch
<<<<
However, intSchedule resolves as a null value. Help?
Thanks.