check Q2 is returning values for that name - as as previously advised 'name' is about the worst reserved word you can use for a field name - although the revised code worked for me
check Q2 is returning values for that name - as as previously advised 'name' is about the worst reserved word you can use for a field name - although the revised code worked for me
its work now.
Thank you guys
I need help with:
I need to add 3 criteriaCode:UPDATE Table1 SET Table1.res = DLookUp("F6","Q3",CRITERIA);
F7 = Table1.F7
F14 = Table1.F14
stat IS NULL
I have tried several times, but it doesnt work.
I guest I use incorrect: " ' &
Can you help me pls?
show what you have tried
what does 'doesn't work' mean?
Also if I use:
it's work and update me 173 recordsCode:UPDATE Table1 SET Table1.res = DLookUp("F6","Q3","F14='" & [mainTable].[F14] & "'");
I want two extra criteria:
F7=[Table1].[F7]
stat is NULL
With the criterias its should be updating -in this case- 173 records too.
I try for example with:
Code:UPDATE Table1 SET Table1.res = DLookUp("F6","Q3" ,"[F7] = " & [Table1].[F7] & " And [F14] = " & [Table1].[F14] & " And [stat] = " & "IS NULL" & "'");
Error:
Code:Microsoft Access can't update all the records in the update query.Microsoft Access didn't update 1565 fields(s) due to type [...]
in your example, you dropped the single quotes but you cannot
"F14='" & [mainTable].[F14] & "'"
put them back and you might be OK.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
Thanks. 50% work , i have problem with third criteria .
its works perfect (thougt I use single quotes only by F14, F7 without ')Code:
DLookUp("F6","Q1" ,"[F7] = " & [Table1].[F7] & " And [F14] = '" & [Table].[F14] & "'" );
but if I add third criteria stat IS NUL my table isnt updates:
Code:
DLookUp("F6","Q1" ,"[F7] = " & [Table1].[F7] & " And [F14] = '" & [Table].[F14] & "' AND [stat] IS NULL" );
I try with difference adding " in different position but still doesnt workCode:
DLookUp("F6","Q1" ,"[F7] = " & [Table1].[F7] & " And [F14] = '" & [Table].[F14] & "' AND [stat] '" & IS NULL & "' ");
Maybe [stat] is not null, but is a zero length string (zls, aka "" ) OR there are no records with Nulls.
To test that, create a query using that table and field and set Is Null as the criteria. If it returns no records, change Is Null to "" in the criteria row. If you get records, the blanks are not Nulls but are empty strings.
Could also try "' AND IsNull([stat])" but "' AND [stat] IS NULL" should work IF there are records with Nulls.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.