Hi Friends,
I am having a problem with a Select query in Access 2007. In my database application in Access 2007, the select query is bound to a subform and I want the query to bring out records with the field in the WHERE clause equal to a module-level variable i have defined in VB code. eg.
I am having a problem with a Select query in Access 2007. In my database application in Access 2007, the select query is bound to a subform and I want the query to bring out records with the field in the WHERE clause equal to a module-level variable i have defined in VB code. eg.
Code:
public mod_variable as integer
'
'I set the variable to a value later
mod_variable =2
'now the select query is like this
SELECT tbl_Music.genre, tbl_Music.album, tbl_Music.artist from tbl_Music
WHERE tbl_Music.musicID=mod_variable;