C
Chris Gorham
Hi,
I'm trying to write some code such that I can check that only the expected
data is in a field of an imported table.
Tried this:
querie_result = DCount("*", "Test Import New Circuit?")
If querie_result = 0 Or querie_result > 2 Then i = 0: GoTo jump4
If DCount("[Circuit?]", "Test Import New Circuit?", "[Circuit?]" =
"Circuit") = 1 Then querie_result = querie_result - 1
If DCount("[Circuit?]", "Test Import New Circuit?", "[Circuit?]" = "Non
Circuit") = 1 Then querie_result = querie_result - 1
If querie_result <> 0 Then GoTo jump4
where "Test Import New Circuit?" is a simple querie that should return just
2 results: "Circuit" and/or "Non Circuit" from a field of the imported table
called "Circuit?".
I then test for the presence of each of these in the querie results.
I'm sure that this is an inefficient way of going about things and anyway I
can't get the DCount("[Circuit?]", "Test Import New Circuit?", "[Circuit?]" =
"Non Circuit") = 1 to work...
Suggestions welcome...Chris
I'm trying to write some code such that I can check that only the expected
data is in a field of an imported table.
Tried this:
querie_result = DCount("*", "Test Import New Circuit?")
If querie_result = 0 Or querie_result > 2 Then i = 0: GoTo jump4
If DCount("[Circuit?]", "Test Import New Circuit?", "[Circuit?]" =
"Circuit") = 1 Then querie_result = querie_result - 1
If DCount("[Circuit?]", "Test Import New Circuit?", "[Circuit?]" = "Non
Circuit") = 1 Then querie_result = querie_result - 1
If querie_result <> 0 Then GoTo jump4
where "Test Import New Circuit?" is a simple querie that should return just
2 results: "Circuit" and/or "Non Circuit" from a field of the imported table
called "Circuit?".
I then test for the presence of each of these in the querie results.
I'm sure that this is an inefficient way of going about things and anyway I
can't get the DCount("[Circuit?]", "Test Import New Circuit?", "[Circuit?]" =
"Non Circuit") = 1 to work...
Suggestions welcome...Chris