lookingforK
Registered User.
- Local time
- Yesterday, 22:57
- Joined
- Aug 29, 2012
- Messages
- 48
Hi,
I am using Query Design with MS Access 2007 to create a query for selecting/extracting a data set.
I make 2 text boxes named "Week From" & "Week To" on a form so that when I enter 2 numbers (but with Text type) in the text boxes and click a button running the query, I would get a selected data set for the specific period.
For example, when I enter "1" in "Week From" and 8 in "Week To", I should get the data set about the period from Week 1 to Week 8.
The problem is:
The data type of the corresponding fields in the table for "Week From" & "Week To" is Integer. So, I need to convert the 2 text boxes from Text to Integer or Number.
I try to use the function Cint (please see below) in the query, but get error message.
* <=CInt([Forms]![Extract Data]![Week To])
* >=CInt([Forms]![Extract Data]![Week From])
Why? How to convert the Text values in Text Boxes and use them as parameters in the query? :banghead:
Thank you in advance.
I am using Query Design with MS Access 2007 to create a query for selecting/extracting a data set.
I make 2 text boxes named "Week From" & "Week To" on a form so that when I enter 2 numbers (but with Text type) in the text boxes and click a button running the query, I would get a selected data set for the specific period.
For example, when I enter "1" in "Week From" and 8 in "Week To", I should get the data set about the period from Week 1 to Week 8.
The problem is:
The data type of the corresponding fields in the table for "Week From" & "Week To" is Integer. So, I need to convert the 2 text boxes from Text to Integer or Number.
I try to use the function Cint (please see below) in the query, but get error message.
* <=CInt([Forms]![Extract Data]![Week To])
* >=CInt([Forms]![Extract Data]![Week From])
Why? How to convert the Text values in Text Boxes and use them as parameters in the query? :banghead:
Thank you in advance.