H
Heidi
I have two fields in a form, RptType (which is either 'P' for positive or 'N'
for negative), and I have a field called 'Port', which may (or may not) be
populated when a report is positive. I have used the following code to carry
down values entered in a previous record:
Me!Port.DefaultValue = Chr(34) & Me!Port & Chr(34)
But, if I have a record with no "port" value, this code appears to bring
down two double quotes (""). However, I also want to include the following
validation:
If Me.RptType = "N" And IsNull(Me.Port) = False Then
MsgBox "Erase port if this is a negative report", vbOKOnly
Cancel = True
Me.Port.SetFocus
However, when entering a RptType of 'N', this validation code is set off
because (I think) 'Port' is not null, it is acutally "". Is there a better
way to carry down values from one record to the next?
Heidi
for negative), and I have a field called 'Port', which may (or may not) be
populated when a report is positive. I have used the following code to carry
down values entered in a previous record:
Me!Port.DefaultValue = Chr(34) & Me!Port & Chr(34)
But, if I have a record with no "port" value, this code appears to bring
down two double quotes (""). However, I also want to include the following
validation:
If Me.RptType = "N" And IsNull(Me.Port) = False Then
MsgBox "Erase port if this is a negative report", vbOKOnly
Cancel = True
Me.Port.SetFocus
However, when entering a RptType of 'N', this validation code is set off
because (I think) 'Port' is not null, it is acutally "". Is there a better
way to carry down values from one record to the next?
Heidi