B
BYoung via AccessMonster.com
Here's what I've got. A form (frmtesting) that is based off of a table
(tbltesting). The form shows the fields in tbltesting
chrTestLevel (lookup box showing level 1-4)
chrAttempt (lookup box to choose which attempt number this is)
dtmTestDate
chrScore
I have added two unbound text boxes to the form to show what the next level
will be and when the next available test date is. I'm new to VBA and have
been trying to write code to give me the next level and test date but have
been unsuccessful.
So here's what I'm trying to do:
In the nextlevel text box I want to show
if chrTestLevel = level1 and the chrScore > 79 then
next level = Level 2
elseif chrTestLevel = level2 and the chrScore > 79 then
next level = Level 3
elseif chrTestLevel = level3 and the chrScore > 79 then
next level = Level 4
(this is not the exact code I tried, yet my elseif code isn't working)
For the NextTestDate text box I have been trying to do
if chrscore>79 then
Dateadd("m", 6, [dtmTestDate])
else Dateadd(""d", 1, [dtmTestDate])
Can anyone help me with this code?
(tbltesting). The form shows the fields in tbltesting
chrTestLevel (lookup box showing level 1-4)
chrAttempt (lookup box to choose which attempt number this is)
dtmTestDate
chrScore
I have added two unbound text boxes to the form to show what the next level
will be and when the next available test date is. I'm new to VBA and have
been trying to write code to give me the next level and test date but have
been unsuccessful.
So here's what I'm trying to do:
In the nextlevel text box I want to show
if chrTestLevel = level1 and the chrScore > 79 then
next level = Level 2
elseif chrTestLevel = level2 and the chrScore > 79 then
next level = Level 3
elseif chrTestLevel = level3 and the chrScore > 79 then
next level = Level 4
(this is not the exact code I tried, yet my elseif code isn't working)
For the NextTestDate text box I have been trying to do
if chrscore>79 then
Dateadd("m", 6, [dtmTestDate])
else Dateadd(""d", 1, [dtmTestDate])
Can anyone help me with this code?