Function IIF and SENDKEYS in a query

Leo_Polla_Psemata

Registered User.
Local time
Today, 12:35
Joined
Mar 24, 2014
Messages
364
A: iff(SOMETHING, THIS, SENDKEYS CTR+" )

Hi, could one query field, which is structured as above, work ?
My need is to fill all blank cells in a query, then i append all records to a table.

In Access we can copy paste the record above with ctrl "
 
you can't do that.
what you can do is create a Function that will
fill a Column of missing data.
 
see Table1, there are missing Values on either Field1 or Field2.
run Query1 and see those values are "filled" in from previous recordd.
 

Attachments

Hi, now i need a function which will tell if the field in id line 10 is same as id line 9, if same we mark as 1 in not same we mark as 2.

In excel the formula would be made very easily - at cell B2 - "=IF(A2=A1,1,2)"
Can we make a function in access as above that will tell if id 1 is same as id 2 ?

What i am trying to achieve, there is a large text message in standard layout, which i use several string functions and convert it to spreadsheet.
I receive this two or three times each week. Currently i shape data in excel, then i copy paste excel in access and bam, i get my spreadsheet plus several other reports.
 
see Table1, there are missing Values on either Field1 or Field2.
run Query1 and see those values are "filled" in from previous recordd.

Hi arnelgp,
now i need a function which will tell if the field in id line 10 is same as id line 9, if same we mark as 1 in not same we mark as 2.

In excel the formula would be made very easily - at cell B2 - "=IF(A2=A1,1,2)"
Can we make a function in access as above that will tell if id 1 is same as id 2 ?

What i am trying to achieve, there is a large text message in standard layout, which i use several string functions and convert it to spreadsheet.
I receive this two or three times each week. Currently i shape data in excel, then i copy paste excel in access and bam, i get my spreadsheet plus several other reports.
 
post a sample xlsx raw data and the expected result on the other sheet.
 
on the Sampol db i posted, create new Query.
do not select any table, instead paste this
in SQL View:

SELECT Table1.Field1, IIf((select TOP 1 field1 from table1 T where T.ID < Table1.ID ORDER BY ID DESC)=[Table1].[Field1],1,2) AS Expr1
FROM Table1;
 
Hi, I am trying to attach an xlsx file but the "attach file" button doesn't see any xlsx format files ??!!
 
No need, now i have got it with this "
SELECT Table1.Field1, IIf((select TOP 1 field1 from table1 T where T.ID < Table1.ID ORDER BY ID DESC)=[Table1].[Field1],1,2) AS Expr1
FROM Table1; "

I am deeply grateful, i don't know how could i ever return this to You ....
 
goodluck, comeback if something came up.
 

Users who are viewing this thread

Back
Top Bottom