EDI text analyzed in Access Query (1 Viewer)

Leo_Polla_Psemata

Registered User.
Local time
Today, 04:10
Joined
Mar 24, 2014
Messages
364
Hi
In excel, say we are at C2 cell, we can make a formula like this:
=if B2 is like this, then fetch B2 to C2, if not then fetch C1 to C2


=IF(A2=16,B2,C1)


Could we make something similar in ACCESS queries ?
 

isladogs

MVP / VIP
Local time
Today, 12:10
Joined
Jan 14, 2017
Messages
18,235
Yes. Use the IIf (intermediate if) function
 

Gasman

Enthusiastic Amateur
Local time
Today, 12:10
Joined
Sep 21, 2011
Messages
14,311
Yes
Along the lines of

Result:IIF(Field1=16,Field2,Field3)
 

Leo_Polla_Psemata

Registered User.
Local time
Today, 04:10
Joined
Mar 24, 2014
Messages
364
Maybe i didn't explain it correctly
In excell, i am at C2 cell and i can copy paste the C1 cell, if ... The cell above C2.



C2=IF(A2=16,B2,C1)


In Access query , i can't copy paste (repeat) the cell above. Can I ?
 

Gasman

Enthusiastic Amateur
Local time
Today, 12:10
Joined
Sep 21, 2011
Messages
14,311
You might be able to, but I am not sure how you would do it until we know the data
It would depend on your data, so if you had a field that was sequential you could use a dlookup and subtract 1 or 2 to get the correct record, or something along those lines.

You really have not given anyone much to go on.
 

isladogs

MVP / VIP
Local time
Today, 12:10
Joined
Jan 14, 2017
Messages
18,235
Excel has cells.
Access has tables, fields and records
If you want to copy the contents of the same field in the previous record use Ctrl+’ (apostrophe)




Sent from my iPhone using Tapatalk
 

Users who are viewing this thread

Top Bottom