A
arunachalam.arcot
Hi, I'm trying to create a dynamic query in MS-Access. I have a table
with 3 fields and my dynamic query will be constructed with those 3
fields. Since I haven't done this before, I searched for help in this
forum and tried to use some, but still I'm getting errors. Can anyone
help me with this?
Find below the code which I'm using.
Sub Defaults()
Dim sql As String
sql = "select count(*) from " & Default_value.Table_name & " where" &
Default_value.Field_Name & "=" & Default_value.Default
CurrentDb.Querydefs("SomeQuery").sql = sql
End Sub
Thanks
Arun
with 3 fields and my dynamic query will be constructed with those 3
fields. Since I haven't done this before, I searched for help in this
forum and tried to use some, but still I'm getting errors. Can anyone
help me with this?
Find below the code which I'm using.
Sub Defaults()
Dim sql As String
sql = "select count(*) from " & Default_value.Table_name & " where" &
Default_value.Field_Name & "=" & Default_value.Default
CurrentDb.Querydefs("SomeQuery").sql = sql
End Sub
Thanks
Arun