need immediate assistance for creating pop up error message

sumukhreddy

New member
Local time
Today, 04:50
Joined
Mar 9, 2016
Messages
6
hello all:)

i'm new to ms acess. i have been assigned a task to create a database for work purpose. we have a turn around time of 48 hours. so i want to create an alert/error message when a pack exceeding 48 hours from the time of receipt. can anyone help to solve this issue?

please consider it as very urgently.

Thanks in advance
 
use the datediff function to calculate the number of minutes (2880 minutes is 48 hours, that is 48 hrs * 60 min/hr).

if DateDiff("n", [dateTimeField], Now()) > 2880 then
msgbox "alert message here"
end if
 
hi arnelgp

Thank you very much your help
 
hi arnelgp,

I need one more help. I've created report from a query and in the report i want only the last row of the query. how can i get that. Please help me. I'm unable to upload a screen shot here.:banghead:

Thanks in advance.
 
one solution is to make your report unbound with all its textbox control source unbound also.
on your reports Open event, write a code that opens your query, go to the last record and set the control source of each textbox on your report dynamically.

private sub report_open(cancel as integer)
dim db as dao.database
dim rs as dao.recordset
const QRY as string = "yourQueryName"
set db = currentdb
set rs= db.querydefs(QRY).openrecordset(dbopensnapshot)
with rs
if not (.bof and .eof) then
.movelast
me.textbox1.controlsource = "=" & chr(34) & .fields("field name to associate with textbox1") & chr(34)
me.textbox2.controlsource = "=" & chr(34) & .fields("field name to associate with textbox2") & chr(34)
...
...
end if
.close
end with
set rs=nothing
set db=nothing
end sub
 

Users who are viewing this thread

Back
Top Bottom