hai all, I have a situation here. For a database for voice mail, I want to limit the number of messages to be recorded for each account. Is is possible to do so with Ms Access. If it is possible, can you all out there lend me a helping hand?
If You are in a form and the messages table is bound to it and limited to the account:
Me.RecordsetClone.MoveLast
If Me.recordsetClone.RecordCount > YourMaxNumber Then
msgbox "Too Many ....
End If
or
Dim Db AS Database
Dim Rs As DAO.Recordset
Dim strSQL as String
'
strSQL = "SELECT * FROM tblMessages WHere Account = '" & TheAccountInHere & "';"
Set Db = CurrentDb()
Set Rs = Db.OpenRecordset(strSQL)
If Rs.Recordcount > YourMAaxNumberHere THEN
msgbox "Too many"
Else
......
Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
kenneth.reaySPAMNOT@talk21.com
remove SPAMNOT to use
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.