In my database, I have a form of reminder.
Query collect all the information about the unfinished business at the base and at the start-up of the base shows form reminders.
The base is splitet into front and back end, and are located on the server. Each user is assigned rights what can be done in the database.
The problem where I am "stuck" is to make the form reminder that can be seen only by those users whose jobs are not completed and not all users of the database. Each user uses his computer with your username and password. I tried to connect to form reminder with this information, but I failed.
I searched all the forums but have not found such an example.
Does anyone know how to overcome this problem ?
The base is splitet into front and back end, and are located on the server. ...
Just a remark here: a copy of the front-end should be placed on any client computer from where it should be started.
As you do not provide any kind of information about the data structures, I'll suppose that the query collecting all the information about unfinished business (let's call it [qry_UnfinishedBusiness]) has a column that identifies the user concerned by an unfinished business. Let's call this column [UserName].
I'll also presume that you have a mean of identifying the user that opened the database. Let's call that variable or column [LoginName].
In the startup procedure, all you need to do is to compare [LoginName] with the set of [UserName] returned by the query. Depending on the actual implementation and the nature of the data you can use a query, a DLookUp() or DCount() function or an Eval() function. For a query, the criteria should be something like:
WHERE [LoginName] IN ( (SELECT [UserName] FROM qry_UnfinishedBusiness) );
Another example using Eval() in VBA:
Const c_SQL As String = "SELECT UserName FROM qry_UnfinishedBusiness;"
Dim rst As DAO.RecordSet
Dim strList As String
' Create the list of UserName's
Set rst = CurrentDb.OpenRecordset(c_SQL, dbOpenSnapshot)
Do Until .Eof
If Len(strList) > 0 Then strList =strList & ", "
strList =strList & "'" & !UserName & "'"
Set rst = Nothing
' Compare the list of UserName's (strList) with LoginName
' and open the form "reminder" if a match is found.
If Eval("'" & LoginName & "' IN ( " & strList & " )") = True Then
Provide precise information about the query and the way the user is identified if you want a more specific answer.
Thank you very much for your prompt response.
Copy of the front-end should be placed on any client computer….
I know, but as the base of the "test" work and need often make corrections in it, it is still on the server. When all updates are complete, everyone will get a copy of front-end base.
And yes. You are right. Query collects all the unfinished business from the base. Basically from only one table, based on the callback expiration date.
On load of Main form i have:
Dim intStore As Integer
intStore = DCount("[Naziv_plana_u_izradi]", "[tblUslovi_detalj]", "[Dat_podsetnik] <= Now() AND [sa_liste] =0")
If intStore = 0 Then
If MsgBox("Ima " & intStore & " uslova koji misu stigli" & _
vbCrLf & vbCrLf & "Hocete li da ih pogledate odmah?", _
vbYesNo, "Uslovi koji kasne...") = vbYes Then
DoCmd.OpenForm "frmReminders", acNormal
[sa_liste] is check box, which when clicked removes the job from the list.
Username and password for the database user is different from the user names and passwords for logging into the IT system.
And i have table: tbl_AssignUsersToGroups, tbl_UserAccess, tbl_ObjectControls, tbl_Groups, tbl_ControlsToDisable which used to allocate rights to users.