Syntax ^'(ctrl + ')

M

michael

i am trying to do an update of a table with an IIF() statement where if my
criteria is true the upade copies the previous record i cannot get the synatx
right for sendkeys it may that it is not possible?
 
J

John Vinson

i am trying to do an update of a table with an IIF() statement where if my
criteria is true the upade copies the previous record i cannot get the synatx
right for sendkeys it may that it is not possible?

Well... DON'T use Sendkeys for this. It's unreliable and buggy, and
there's never a *good* reason to use it.

I would suggest either using DLookUp to find the value in the
"previous" record in the Table, if you have some criteria to identify
which is the 'previous' record (a table has no order so this may be
difficult); or, you can use a contro'ls AfterUpdate event to set that
control's Tag property to its Value, and then pull the value from the
Tag in your conditional code.

Could you explain what you're attempting to accomplish? There may be
an easier way!

John W. Vinson[MVP]
 
M

Mike Gill

I am importing an excel spreadsheet that has been exported from another
proprietry program i first import it and the append to my tblImportProducts
with fldPartNumber,fldDescription and fldProductGroup. The imported spread
sheet has a empty PartNumber in the first row but has a Product Group in the
Description. I append the Description to both the fld Description and
fldProductGroup then i was going to update the fldProductGroup with IIf
(fldPartNumber is not null,ctrl', fldProductGroup)


Part Number Description ProductGroup
Widgets Widgets
1 W1 W1
2 W2 W2
3 W3 W3
Things Things
4 T1 T1
5 T2 T2


Michael
 
Top