I am a beginner so bare with me please...
I am having trouble creating reports based on user entered data.
I have a database table made up of alot of fields one in particular is a
unique sheet number.
I want to be able to allow the user to retrieve
a report from the database (which is an access database) by entering
a valid sheet number in a text box.
I am using the data report designer. I have the report designed and also
a connection ( called conRequest) established with the database. To source
the data returned from the database I want to use an sql statement. (one of the 2 option given
when sourcing data in report designer).
Currently if I hardcode ( that is enter a valid sheet number (well one that
is in the databasae) the sql statement
e.g select * from request where sheetnumber = 4454
it retrieves the relevant information I want.
My problem is that I want the user to be able to enter a sheet number on a
form ( a form called say frmReport) in a text box ( say called txtSheetNumber)
then click a command buttonthat returns a report. I am trying to get the sql syntax correct
and am having difficulty. I am trying sql like
select * from request where sheetnumber = frmreport.txtsheetnumber.text
but I am getting an error stating "NO value given for one or more required
parametres" when I enter a number in the textbox specified in the sql statement
and click the retrieve report button.
Can anyone help?
It would be greatly appreciated.
I am having trouble creating reports based on user entered data.
I have a database table made up of alot of fields one in particular is a
unique sheet number.
I want to be able to allow the user to retrieve
a report from the database (which is an access database) by entering
a valid sheet number in a text box.
I am using the data report designer. I have the report designed and also
a connection ( called conRequest) established with the database. To source
the data returned from the database I want to use an sql statement. (one of the 2 option given
when sourcing data in report designer).
Currently if I hardcode ( that is enter a valid sheet number (well one that
is in the databasae) the sql statement
e.g select * from request where sheetnumber = 4454
it retrieves the relevant information I want.
My problem is that I want the user to be able to enter a sheet number on a
form ( a form called say frmReport) in a text box ( say called txtSheetNumber)
then click a command buttonthat returns a report. I am trying to get the sql syntax correct
and am having difficulty. I am trying sql like
select * from request where sheetnumber = frmreport.txtsheetnumber.text
but I am getting an error stating "NO value given for one or more required
parametres" when I enter a number in the textbox specified in the sql statement
and click the retrieve report button.
Can anyone help?
It would be greatly appreciated.