 |
|
| Computers Forum Index » Computer - Databases - MS Access » Issue with continuous forms... |
|
Page 1 of 1 |
|
| Author |
Message |
| Odd... |
Posted: Thu Oct 22, 2009 8:52 pm |
|
|
|
Guest
|
Hello,
I have a continuous subform within a form. Behind a button on the
form, I included validation checks to ensure that various fields (on
both form and subform) have been filled out properly. The fields that
are not filled out properly have their corresponding label colored in
RED. The problem that I am experiencing is on the continuous subform.
The validation check only seem to check the first detail line. For
example, the user could have entered the first detail line correctly
but the second detail line incorrectly. Since the validaton check seem
to take the first line into consideration only, it thinks that the all
fields have been out properly but really, that is wrong because the
second detail line was filled out incorrectly. I have inserted a piece
of my validation check code.
If Nz(Me![frmExpenseAllocTransit].Form.[cbExpenseAllocTransit], "")
= 0 Or Nz(Me![frmExpenseAllocTransit].Form.[cbExpenseAllocTransit],
"") = "" Or _
Me![frmExpenseAllocTransit].Form.[SumofAllocationAmount] <>
Me.dblAmount Then
Me.lblExpenseAllocTransit.ForeColor = RGB(255, 0, 0)
Else
Me.lblExpenseAllocTransit.ForeColor = RGB(0, 0, 0)
End If |
|
|
| Back to top |
|
|
|
| Roger... |
Posted: Thu Oct 22, 2009 9:11 pm |
|
|
|
Guest
|
On Oct 22, 2:52 pm, Odd <audrey.... at (no spam) gmail.com> wrote:
Quote: Hello,
I have a continuous subform within a form. Behind a button on the
form, I included validation checks to ensure that various fields (on
both form and subform) have been filled out properly. The fields that
are not filled out properly have their corresponding label colored in
RED. The problem that I am experiencing is on the continuous subform.
The validation check only seem to check the first detail line. For
example, the user could have entered the first detail line correctly
but the second detail line incorrectly. Since the validaton check seem
to take the first line into consideration only, it thinks that the all
fields have been out properly but really, that is wrong because the
second detail line was filled out incorrectly. I have inserted a piece
of my validation check code.
If Nz(Me![frmExpenseAllocTransit].Form.[cbExpenseAllocTransit], "")
= 0 Or Nz(Me![frmExpenseAllocTransit].Form.[cbExpenseAllocTransit],
"") = "" Or _
Me![frmExpenseAllocTransit].Form.[SumofAllocationAmount]
Me.dblAmount Then
Me.lblExpenseAllocTransit.ForeColor = RGB(255, 0, 0)
Else
Me.lblExpenseAllocTransit.ForeColor = RGB(0, 0, 0)
End If
only one 'line' of a continuous form is identified as "current"
you might show lines A, B, C
now if you click on any fields in line B, it becomes the current
record, A and C are display only
of course when opening a form, the first line of a subform is
automatically current |
|
|
| Back to top |
|
|
|
| Odd... |
Posted: Thu Oct 22, 2009 9:34 pm |
|
|
|
Guest
|
On Oct 22, 5:11 pm, Roger <lesperan... at (no spam) natpro.com> wrote:
Quote: On Oct 22, 2:52 pm, Odd <audrey.... at (no spam) gmail.com> wrote:
Hello,
I have a continuous subform within a form. Behind a button on the
form, I included validation checks to ensure that various fields (on
both form and subform) have been filled out properly. The fields that
are not filled out properly have their corresponding label colored in
RED. The problem that I am experiencing is on the continuous subform.
The validation check only seem to check the first detail line. For
example, the user could have entered the first detail line correctly
but the second detail line incorrectly. Since the validaton check seem
to take the first line into consideration only, it thinks that the all
fields have been out properly but really, that is wrong because the
second detail line was filled out incorrectly. I have inserted a piece
of my validation check code.
If Nz(Me![frmExpenseAllocTransit].Form.[cbExpenseAllocTransit], "")
= 0 Or Nz(Me![frmExpenseAllocTransit].Form.[cbExpenseAllocTransit],
"") = "" Or _
Me![frmExpenseAllocTransit].Form.[SumofAllocationAmount]
Me.dblAmount Then
Me.lblExpenseAllocTransit.ForeColor = RGB(255, 0, 0)
Else
Me.lblExpenseAllocTransit.ForeColor = RGB(0, 0, 0)
End If
only one 'line' of a continuous form is identified as "current"
you might show lines A, B, C
now if you click on any fields in line B, it becomes the current
record, A and C are display only
of course when opening a form, the first line of a subform is
automatically current- Hide quoted text -
- Show quoted text -
I tried to set focus on the second line (the erroneous one) of the
continuous form and still, it validates on the first line.
Nevertheless, the end user would not know to set focus on the
erroneous lines (or he/she would already discover what they have
inputted is wrong =) ) Is there any method to loop through these
"lines" and catch the error?? |
|
|
| Back to top |
|
|
|
|
|
All times are GMT
The time now is Sun Mar 21, 2010 4:36 am
|
|