here goes
i am still trouble shooting so there might be lots of commented codes and mistakes
Option Explicit
Private Sub UpdateNulls()
Dim rs As DAO.Recordset
Dim rs2 As DAO.Recordset
Dim rs3 As DAO.Recordset
Dim tdf As DAO.TableDef
Dim db As Database
Dim varii As Variant...
i have managed to populate the 'validcodes' array with values 3,4,9
now the second array 'vari_able' has two columns and i can see in the watch window that vari_able(0) has the values of fields and vari_able(1) has the id numbers.
i want to write a condition to check whether all the field...
HI,
I guess this is the correct forum for this question
i have an array 'validcodes'
now i have another array which has two columns from a recordset idno and values
i want to check and see if the values in second array are the values specified in teh first array.
if they are not then i...
sorry about the posting i though recordsets would come under jet sql
i have an array validcodes with a few values.
i have a recordset with two column id number and field values
i want to check the values of array validcodes with the field values of recordset and if they dont match i want to...
Actually i am already using that recordset for another loop with dao.
now should i make another connncetion to the databse using ado.
if i do this this will come in the loop by dao
is this ok
hope i am clear
I am trying to use the following syntax to get all the values in a column for a particular field in to an array
(astrFields(intIx)) points to the field name
varii = (.Fields(astrFields(intIx)))
if varii is declared as variant is this enough to get all the field values into varii
i think the problems is in sql statement.
varname = 'astrfields(intx)' as when i give the variable name directly the code works
one more doubt suppose i have a rray with 4 or five values
and i want to check them against some field will this condition work
if value<>array_values
then
strsql2 = "SELECT label.validcode FROM variablen AS s INNER JOIN label ON s.id=label.variablenid WHERE varname='astrFields(intIx)';"
Set db = OpenDatabase("C:\Documents and Settings\TAYYAPP\Desktop\GIDAS_Codebook.mdb")
Set rs2 = db.OpenRecordset(strsql2)
With...
i went through it and tried the followin
With rs2
.MoveLast
.MoveFirst
astrvalidcodes = rs2.GetRows(.RecordCount)
'.Close ' assuming you want to do this
End With
but i am getting runtime error 3021
thanks
suppose i have two columns in the recordset and i want to store the values of one column in a array.
if the header of column is valid code
Dim astrvalidcodes As Variant
astrvalidcodes = rs2("validcode")
can i write this or do i have to use a do while loop
now i get as a result of query the id of speed.
1
1
1
any idea how i can proceed to check the values of speed against the allowed values.
do i store the allowed values in a array and run a check?
HI
I have two tables like the following:
table1
id variable
1 speed
2 distance
3 acceleration
table2
id allowedvalue
1 3
1 5
1 6
2 4
2 5
i want to write a a loop to check whether for a given variable in all tables in the database the values is within the allowed value. THe link for getting...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.