Solved How to show status on the form (1 Viewer)

lacampeona

Registered User.
Local time
Today, 06:12
Joined
Dec 28, 2015
Messages
392
Hello experts I need some ideas, help how to make something: I Have two problems.

1. Problem ( Inform the user that some of statuses was already assigned for that item),
My problem:
Lets say i have items A; B,C;D... Item A has ID 1, B= 2,C= 3,D= 4.... And for each item user can choose differens statuses. that mean that statuses are changing ..
I have 8 statuses:
(1) New
(2) In-use
(3) Relased
(4) Not good
(5) Testing
(6) Sended
(7) Out of use
(8) Destroyed

let say that my item A has in 7 days usage these statuses.
day1 New
day2 Testing
day3 Testting
day4 Relased
day5 Sended
day6 Testing
day7 Out of use
now Testing

How to make some field on form that will show the status Relased from day 4 and also showing the new status ( current use) in this case Testing?

and my second problem:
How to prevent the user that he cant choose status Released 2 times. Lets say he use status released on day4 and he will also want to use status relased on day 9 or next time in the future?
if someone can show me some example how to manage that i would be very grateful.
thanks in advance
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:12
Joined
Oct 29, 2018
Messages
21,449
Hi. For request #1, you could maybe try using DLookup(). For request #2, it should be the same as preventing duplicate records, which means you can probably use DCount().
 

lacampeona

Registered User.
Local time
Today, 06:12
Joined
Dec 28, 2015
Messages
392
Can you show me some example for correct use for DLookup() and for DCount().?
thank you
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:12
Joined
Oct 29, 2018
Messages
21,449
Can you show me some example for correct use for DLookup() and for DCount().?
thank you
Here are some potential examples:
Code:
DLookup("Status","ItemStatusTable","Item='A' AND StatusDay='Day4')
Code:
If DCount("*","ItemStatusTable","Item='A' AND Status='Released'")>0 Then
    'duplicate
End If
 

Users who are viewing this thread

Top Bottom