Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

message / popup message box in access forms

Status
Not open for further replies.

jazz007

Technical User
Jan 13, 2005
15
GB
hi
I wonder if anyone can help. In Access forms I have column A and column B and Column C. Column C = Column B - Column A. Now can I have a message box/popup box displayed in column C only if the value is greater than >=14. Message saying over 14 days. if the value in Column c is less than 14 then NO message box/popup box.
Is this possible in forms. Thanks.
 
If the AfterUpadate procedure of the field enter this code

If Field Name >= 14 Then

MsgBox "Over 14 days"

End If


Hope this helps
 
i have tried this but it does not seem to show a message box
Went to After update, code builder.

Private Sub Column C_AfterUpdate()
If [Column B] - [Column A] >= 14 Then

MsgBox "Over 14 days"

End If

End Sub

Also have tried this and not seem to work

Private Sub Column C_AfterUpdate()
If Column C >= 14 Then

MsgBox "Over 14 days"

End If

End Sub

Am I doing something Wrong, please let me know

 
use the following code:

Code:
Private Sub Column_A_AfterUpdate()

Column_C = Column_B - Column_A

If Column_C >= 14 Then

MsgBox "Over 14 days"

End If


End Sub
Private Sub Column_B_AfterUpdate()

Column_C = Column_B - Column_A

If Column_C >= 14 Then

MsgBox "Over 14 days"

End If

End Sub

I have tested it and its all works
 
I dont know what I am doing wrong
I go to ColumnC and right click on After Update, choose code builder, and typed this code

Private Sub ColumnC_AfterUpdate()

ColumnC = ColumnA - ColumnB
If ColumnC >= 14 Then

MsgBox "Over 14 days"

End If
End Sub

I enter data on ColumnA, I enter data on ColumnB, but in ColumnC the calculation happens it Does ColumnA - ColumnB, but even if the answer is more than 14 days no message seems to appear, what seem to be the problem I dont understand. Can anyone Help please Many thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top