Click here to Skip to main content
15,902,189 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: 2 month between now and date Pin
Guffa20-Aug-06 21:47
Guffa20-Aug-06 21:47 
GeneralRe: 2 month between now and date Pin
campbells20-Aug-06 22:15
campbells20-Aug-06 22:15 
AnswerRe: 2 month between now and date Pin
Guffa20-Aug-06 23:14
Guffa20-Aug-06 23:14 
GeneralRe: 2 month between now and date [modified] Pin
Keith Malwitz21-Aug-06 2:07
Keith Malwitz21-Aug-06 2:07 
GeneralRe: 2 month between now and date Pin
campbells21-Aug-06 15:13
campbells21-Aug-06 15:13 
GeneralRe: 2 month between now and date Pin
Keith Malwitz21-Aug-06 15:19
Keith Malwitz21-Aug-06 15:19 
GeneralRe: 2 month between now and date Pin
campbells21-Aug-06 15:58
campbells21-Aug-06 15:58 
GeneralRe: 2 month between now and date [modified] Pin
Keith Malwitz21-Aug-06 16:25
Keith Malwitz21-Aug-06 16:25 
Ok, you will need to create the SQL Query string to incorporate the user's input. The way you are trying to do it is causing the Database to treat userin as a parameter.

Dim myQuery as String
myQuery = "SELECT yourFields FROM yourTables WHERE [ContractEnd] BETWEEN NOW AND DATEADD('m'," & userin & ",NOW)"

This simply concatenates the string to include the user input. Of course, it is likely better to create a parameter for the user's input in the query, then pass the user's input to it. I am not sure how you would do this in Access, as I have not used it in many years.


-- modified at 23:07 Monday 21st August, 2006
GeneralRe: 2 month between now and date Pin
campbells21-Aug-06 16:30
campbells21-Aug-06 16:30 
Questionexecuting problem Pin
tsrao_5520-Aug-06 8:43
tsrao_5520-Aug-06 8:43 
AnswerRe: executing problem Pin
Dave Kreskowiak20-Aug-06 9:12
mveDave Kreskowiak20-Aug-06 9:12 
AnswerRe: executing problem Pin
Colin Angus Mackay20-Aug-06 10:56
Colin Angus Mackay20-Aug-06 10:56 
QuestionRe: executing problem Pin
tsrao_5521-Aug-06 9:54
tsrao_5521-Aug-06 9:54 
AnswerRe: executing problem [modified] Pin
Dave Kreskowiak21-Aug-06 9:58
mveDave Kreskowiak21-Aug-06 9:58 
Question.Net 2.0 Books [modified] Pin
Stephen McGuire20-Aug-06 7:16
Stephen McGuire20-Aug-06 7:16 
AnswerRe: .Net 2.0 Books Pin
Kevin McFarlane20-Aug-06 10:04
Kevin McFarlane20-Aug-06 10:04 
GeneralRe: .Net 2.0 Books Pin
Stephen McGuire20-Aug-06 11:13
Stephen McGuire20-Aug-06 11:13 
GeneralRe: .Net 2.0 Books Pin
Kevin McFarlane20-Aug-06 11:58
Kevin McFarlane20-Aug-06 11:58 
GeneralRe: .Net 2.0 Books Pin
Stephen McGuire21-Aug-06 11:27
Stephen McGuire21-Aug-06 11:27 
GeneralRe: .Net 2.0 Books Pin
Dave Sexton21-Aug-06 1:01
Dave Sexton21-Aug-06 1:01 
GeneralRe: .Net 2.0 Books Pin
Stephen McGuire21-Aug-06 11:37
Stephen McGuire21-Aug-06 11:37 
GeneralRe: .Net 2.0 Books Pin
Dave Sexton21-Aug-06 20:44
Dave Sexton21-Aug-06 20:44 
AnswerRe: .Net 2.0 Books Pin
tanya foster21-Aug-06 5:44
tanya foster21-Aug-06 5:44 
GeneralRe: .Net 2.0 Books Pin
Stephen McGuire21-Aug-06 11:40
Stephen McGuire21-Aug-06 11:40 
AnswerRe: .Net 2.0 Books Pin
Kevin McFarlane22-Aug-06 22:40
Kevin McFarlane22-Aug-06 22:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.