Solved Mark Record as read for the current user and not for all users (1 Viewer)

Sarah.M

Member
Local time
Today, 22:23
Joined
Oct 28, 2021
Messages
335
Hi, Plz note, My VBA is blocked by IT for security reason.
I can use only Expression builder, Macros, Queries, Tables, Forms and Reports only.
------------------------------------------------
I have DB for 3 users, I have, MeetingF
I want the new record to be a different color, and when the user opens the record, its status is read and the color returns to its normal state
If I put Read on MeetingF it dose not work, When I click on it, all users appear as read. I want only the current user to whom it appears as read 😒

plz help me to fix it 🙏
Sample attached
 

Attachments

  • 11.accdb
    1.9 MB · Views: 213

MajP

You've got your good things, and you've got mine.
Local time
Today, 15:23
Joined
May 21, 2018
Messages
8,463
You will need another table. Is this a split database? If it is a split database each user has their own front end so simply logging a record ID into a local table on each front end is fine, but you cannot have a read field in the meetings table.
TblRead
MeetingID

If you have multiple people using the same front end then your table needs to be
TblRead
UserID
MeetingID

Now you have multiple user IDs in tblRead for each meeting.

I Do not do macros so I do not know the expression. I assume you can then do a dlookup though to see if the UserID is in tblRead.
Hopefully someone good with expressions can help, but you will need a seperate table either way.
 

GPGeorge

Grover Park George
Local time
Today, 12:23
Joined
Nov 25, 2004
Messages
1,776
You will need another table. Is this a split database? If it is a split database each user has their own front end so simply logging a record ID into a local table on each front end is fine, but you cannot have a read field in the meetings table.
TblRead
MeetingID

If you have multiple people using the same front end then your table needs to be
TblRead
UserID
MeetingID

Now you have multiple user IDs in tblRead for each meeting.

I Do not do macros so I do not know the expression. I assume you can then do a dlookup though to see if the UserID is in tblRead.
Hopefully someone good with expressions can help, but you will need a seperate table either way.
Macros are not familiar to most of us because, well, macros. That said, I believe the Lookup Action will be the key to finding a record in the table proposed, tblRead.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:23
Joined
May 7, 2009
Messages
19,169
you try this.
note when i add records (on Read table) when MeetingF opens and
and mark them as read when it closes.
also added index on MeetingID + UserID (Unique) so no problem
adding over and over as long as SetWarnings is Off.
 

Attachments

  • 11 (1).accdb
    2.3 MB · Views: 237

Sarah.M

Member
Local time
Today, 22:23
Joined
Oct 28, 2021
Messages
335
@arnelgp You did great job
I apologize 🙏 I didn't explain it well ☹️ I forgot to put [AddMeetingF]. I will explain what I mean more here. for example the row for Meeting number 5 will be yellow but when I open it by "Edit Meeting Form" the row color will go back to its default color and then the status of this meeting will be read. Then up there it will count how many unread meetings, I was trying to fix it but I could not I am sorry

Plz help me!
Sample attached
1649189322221.png
 

Attachments

  • 12 (2).accdb
    2.3 MB · Views: 210
Last edited:

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:23
Joined
Feb 19, 2002
Messages
42,973
@Sarah.M I admire your tenacity. Your employer has tied one hand behind your back and allowed you to only work on Tuesday's with odd day numbers and you are making a go of it. When this is done, YOU will be the resident expert in macros and probably need to seek employment with Microsoft because they need all the help they can get.
 

Sarah.M

Member
Local time
Today, 22:23
Joined
Oct 28, 2021
Messages
335
@Sarah.M I admire your tenacity. Your employer has tied one hand behind your back and allowed you to only work on Tuesday's with odd day numbers and you are making a go of it. When this is done, YOU will be the resident expert in macros and probably need to seek employment with Microsoft because they need all the help they can get.
Thanks for the positive motivation
Never give up!
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:23
Joined
May 7, 2009
Messages
19,169
it is on the "Click" event of the Meeting ID on MeetingF form.
 

Attachments

  • 12 (2).accdb
    2.6 MB · Views: 218

Sarah.M

Member
Local time
Today, 22:23
Joined
Oct 28, 2021
Messages
335
it is on the "Click" event of the Meeting ID on MeetingF form.
@arnelgp WoW It works Great!,
but i have small problems,
1. if I log in with Nancy it is working god, but if I log in with deferent user I got error message
2. The unread rows are not colored

plz can you help me to fix it plz
sample attached i add log out button

1649251074012.png

1649251568274.png
1649251040112.png
 

Attachments

  • 13.accdb
    2.6 MB · Views: 149

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:23
Joined
May 7, 2009
Messages
19,169
ok, check and test again.
 

Attachments

  • 13.accdb
    2.6 MB · Views: 217

Sarah.M

Member
Local time
Today, 22:23
Joined
Oct 28, 2021
Messages
335
ok, check and test again.
Kindly, can you convert it to Query becuse I want to make it clickable by macro to show me only the unread records
=DCount("1","ReadT","UserID = " & [Forms]![LogInForm]![ComboUserName] & " And Read = 0") it tried, but I could not I got no result :( :cautious:
plz help me! 🙏

Sample Attached


1649425933116.png
1649425522041.png
 

Attachments

  • Read14.accdb
    2.6 MB · Views: 132

Sarah.M

Member
Local time
Today, 22:23
Joined
Oct 28, 2021
Messages
335
I did this try, it works!, but If I link it to SetFilter I got errors ☹️



1649427656102.png

1649427679204.png


1649427542276.png
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:23
Joined
May 7, 2009
Messages
19,169
i added a Command button (cmdFilter, Transparent) On Top of the Unread textbox value.
When clicked it will Toggle Filter/Unfilter.
see the macro behind it.
also see qryFilterMeetingF query (the filter behind all of this) in design view.
 

Attachments

  • Read14.accdb
    864 KB · Views: 189

Sarah.M

Member
Local time
Today, 22:23
Joined
Oct 28, 2021
Messages
335
i added a Command button (cmdFilter, Transparent) On Top of the Unread textbox value.
When clicked it will Toggle Filter/Unfilter.
see the macro behind it.
also see qryFilterMeetingF query (the filter behind all of this) in design view.
AWESOME! 👏
it works Thanks!!!
 

Users who are viewing this thread

Top Bottom