STEVE PERRY
asked on
compare values and send alert
Have data in table
i need an way to alert me when the data is compare
for best example i have table tdata
in tdata field A have value ABCD , EFGH, KLMN
is for example ABCD is identify need an alert me
any idea??
i need an way to alert me when the data is compare
for best example i have table tdata
in tdata field A have value ABCD , EFGH, KLMN
is for example ABCD is identify need an alert me
any idea??
ASKER
Ryan Chong
tnks !! good friend !
have formDATA
but how i put that code to work in ??
tnks !! good friend !
have formDATA
but how i put that code to work in ??
ASKER
yes make sense ! to me
but how implement it ?
but how implement it ?
ASKER
Ryan Chong
because a situation in here
the value from fieldA comes from an expression in an query
because a situation in here
the value from fieldA comes from an expression in an query
ok, the DCount function should work well for query as well...
did you encounter any errors so far?
did you encounter any errors so far?
ASKER
HAVE PROBLEMS
BECAUSE IS WORKING WITH EVRY RECORD NO JUST THE VALUE IM LOOKING FOR!
BECAUSE IS WORKING WITH EVRY RECORD NO JUST THE VALUE IM LOOKING FOR!
can you explicitly tell us what you intend to show/ how will it be shown when:
1. one record is detected that met the criteria
2. multiple records are detected that met the criteria
1. one record is detected that met the criteria
2. multiple records are detected that met the criteria
ASKER
Ryan Chong
heres is an sample
when
one ofthe code is set i need an alert
but is working with all the record no just the trigger record!
DATASAMPLE.accdb
heres is an sample
when
one ofthe code is set i need an alert
but is working with all the record no just the trigger record!
DATASAMPLE.accdb
ASKER
Ryan Chong
DO I EXPLAIN GOOD ?
DO I EXPLAIN GOOD ?
I will have a look later as there's no MS Access installed in my current working machine.
ASKER
thanks very much good friend !
ASKER
by the way Ryan Chong
if i have an number field like 708 or 600
and i want just tke the cero from thet number to be show in other field
is that possible ?
if i have an number field like 708 or 600
and i want just tke the cero from thet number to be show in other field
is that possible ?
>>but is working with all the record no just the trigger record!
so i guess you only want to check if the "current record's AB field = 78 ?
if yes, then you can try like:
ok, so if field1 contains 708, what you want to show in field2 ?
DATASAMPLE_b.accdb
so i guess you only want to check if the "current record's AB field = 78 ?
if yes, then you can try like:
Private Sub Form_Current()
If AB.Value = 78 Then
MsgBox "Alert me this code is on "
End If
End Sub
>>and i want just tke the cero from thet number to be show in other fieldok, so if field1 contains 708, what you want to show in field2 ?
DATASAMPLE_b.accdb
ASKER
Ryan Chong
thanks my good angel!
if field is 708 i just want the 0 be in other field2
thanks my good angel!
if field is 708 i just want the 0 be in other field2
ASKER
but cero can be in any code
i mean could be 708, 078, 870 ect....
i mean could be 708, 078, 870 ect....
>>if field is 708 i just want the 0 be in other field2
will this field2's value be saved in your table or just for display purposes in your form?
will this field2's value be saved in your table or just for display purposes in your form?
ASKER
Ryan Chong
be saved in table
be saved in table
>>if field is 708 i just want the 0 be in other field2
I guess the "field" refers to "DATA" field?
I have made the following changes accordingly.
1. Add a sample field called "Field2" in Table1
2. Update the Query1
3. Add Field2 into form FRM_DATA
4. Add the After Update event for the field "DATA" in form FRM_DATA
I guess the "field" refers to "DATA" field?
I have made the following changes accordingly.
1. Add a sample field called "Field2" in Table1
2. Update the Query1
3. Add Field2 into form FRM_DATA
4. Add the After Update event for the field "DATA" in form FRM_DATA
Private Sub DATA_AfterUpdate()
Field2.Value = IIf(InStr(1, DATA.Value, "0", vbTextCompare) > 0, "0", "")
Form.Refresh
End Sub
DATASAMPLE_c.accdb
ASKER
Ryan Chong
have a question in here
have so many values will be a long list
there's an way to read it from an table or query
for example i mean the 78 89 90 ect..
the code i need to
Private Sub Form_Current()
If AB.Value = 78 Then
MsgBox "Alert me this code is on "
End If
End Sub
have a question in here
have so many values will be a long list
there's an way to read it from an table or query
for example i mean the 78 89 90 ect..
the code i need to
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ryan Chong
Is working but one issue here
i have an table with data already
this sub is working for the new data put in
theres an way to have the same result
but with the data already in the table ?
Private Sub DATA_AfterUpdate()
Field2.Value = IIf(InStr(1, DATA.Value, "0", vbTextCompare) > 0, "0", "")
Form.Refresh
End Sub
Is working but one issue here
i have an table with data already
this sub is working for the new data put in
theres an way to have the same result
but with the data already in the table ?
>>theres an way to have the same result
>>but with the data already in the table ?
yup, did you manage to see the sample I had uploaded in comment: ID: 40958636? It should able to handle existing records as well.
>>but with the data already in the table ?
yup, did you manage to see the sample I had uploaded in comment: ID: 40958636? It should able to handle existing records as well.
ASKER
Ryan Chong
I Test it from comment: ID: 40958636
could you please give an check?
i change some numbers to have 0 value already in the table
taht way it don't work
is because i have data alredy in with a lot of recods
and i will have to retype one by one
will be difficult
I Test it from comment: ID: 40958636
could you please give an check?
i change some numbers to have 0 value already in the table
taht way it don't work
is because i have data alredy in with a lot of recods
and i will have to retype one by one
will be difficult
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ryan Chong
That's Great !
let me try it..
That's Great !
let me try it..
ASKER
Ryan Chong
UPDATE query is working great !!
but still with one issue
with the AB field this is woking like you say an that's fine
but i will need compare the AB field from table1
to code field table2
is that posible?
DATASAMPLE_b.accdb
UPDATE query is working great !!
but still with one issue
with the AB field this is woking like you say an that's fine
but i will need compare the AB field from table1
to code field table2
is that posible?
DATASAMPLE_b.accdb
>>but i will need compare the AB field from table1
>>to code field table2
sure, that's feasible. Can you give us an example how you want it to be done?
(sorry, I not yet check your attached db in comment: ID: 40961127)
>>to code field table2
sure, that's feasible. Can you give us an example how you want it to be done?
(sorry, I not yet check your attached db in comment: ID: 40961127)
ASKER
Ryan Chong
don't know how to do it
but i need compare values from FIELD AB TO
VALUES IN tables2 if is in an message shoul alert
don't know how to do it
but i need compare values from FIELD AB TO
VALUES IN tables2 if is in an message shoul alert
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ryan Chong,
IS WORKING GREAT !!
you my master !
IS WORKING GREAT !!
you my master !
glad that i could make some helps cheers!
ASKER
Ryan Chong
keep on the good !
i will miss you !
i have others questions
can we keep here ?
keep on the good !
i will miss you !
i have others questions
can we keep here ?
if you still have a series of questions, I guess it's better to create other posts in case i'm busy and not able to help cheers
ASKER
THE BEST!
let's say in an Access form, you can try use Dcount function:
Open in new window
will this make sense to you?