Some info:
I am currently making a DVD database that is quite large and rapidly coming more complex as I have new ideas to improve functionality. Right now I am trying to create an advanced search form for my database. Basically, I just want to make a form that can do the same as an access query but making it nicer looking and more user friendly (ie. without all the access punctuation with ", * etc.). My database is not an easy list of just the names of films, but also has fields like genre, actors, lengths, etc.
So far I have my form made with all necessary text boxes and drop down menu's for my search form. I followed some advise I found online and created a query and used the following code for each field:
Like "*" & [Forms]![Advanced Search]![MovieNameBox] & "*"
So when all the data fields are empty and you press the button to start the search all data is present. This code for the movie names is great! works just like I want because the user doesn't have to be familiar with the punctuation of access to search a movie, and it can be a partial title and still show.
My problem is when I search a movie by it's length/running time, or year. with the same code as above I can only search a specific time or year (ie. 1:46, or 2005). I would like to be able to search like a query (ie. >1:30 or <=2003) but without the user typing in the punctuation. My idea was to create a few small buttons beside the "movie length" text box that would toggle on and off for ">", "<", and "=" (possible to toggle more then one) and place it in the text box for the user but would also be invisible to them as well (running in the background). This way the user could search movies that are > 1:30 or <= 2008.
Using the code from above in the query for year and movie length, if I type in the year text box for example >2010 and click my search button (which runs the query) no results come up. I believe the problem is the like statement but have tried many different statements with no success.
I don't think its possible to do it in a query with the above code. I would have to actually code the buttons and am really lost on how to do so.
Does anybody have any input on how to go about doing this?
I am currently making a DVD database that is quite large and rapidly coming more complex as I have new ideas to improve functionality. Right now I am trying to create an advanced search form for my database. Basically, I just want to make a form that can do the same as an access query but making it nicer looking and more user friendly (ie. without all the access punctuation with ", * etc.). My database is not an easy list of just the names of films, but also has fields like genre, actors, lengths, etc.
So far I have my form made with all necessary text boxes and drop down menu's for my search form. I followed some advise I found online and created a query and used the following code for each field:
Like "*" & [Forms]![Advanced Search]![MovieNameBox] & "*"
So when all the data fields are empty and you press the button to start the search all data is present. This code for the movie names is great! works just like I want because the user doesn't have to be familiar with the punctuation of access to search a movie, and it can be a partial title and still show.
My problem is when I search a movie by it's length/running time, or year. with the same code as above I can only search a specific time or year (ie. 1:46, or 2005). I would like to be able to search like a query (ie. >1:30 or <=2003) but without the user typing in the punctuation. My idea was to create a few small buttons beside the "movie length" text box that would toggle on and off for ">", "<", and "=" (possible to toggle more then one) and place it in the text box for the user but would also be invisible to them as well (running in the background). This way the user could search movies that are > 1:30 or <= 2008.
Using the code from above in the query for year and movie length, if I type in the year text box for example >2010 and click my search button (which runs the query) no results come up. I believe the problem is the like statement but have tried many different statements with no success.

I don't think its possible to do it in a query with the above code. I would have to actually code the buttons and am really lost on how to do so.

Does anybody have any input on how to go about doing this?