Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

searching an Acess database

hey guys and gals,


I have looked over the posts on this board and I know that this question has been asked and answer a number of times but mine is different so I have to ask it


I'am making a database for a friend of mine and I have the Access database made but Iam having trouble search one field I have a textbox named txtSearch where the user enters a search word and I have a command box cmdSearch that the user hits to search I need to know the code I need to search the database inventory table name is tblinvent the field is fldItemRequested and I need to send the results to a datagrid called datinvent if you have any other question or would like the source code Iam using email me @ philippians413usa@yahoo.com


Thank you in advance for your help


Matthew J. Meahl
«1

Comments

  • GogiGogi Member Posts: 258
    : hey guys and gals,
    :
    :
    : I have looked over the posts on this board and I know that this question has been asked and answer a number of times but mine is different so I have to ask it
    :
    :
    : I'am making a database for a friend of mine and I have the Access database made but Iam having trouble search one field I have a textbox named txtSearch where the user enters a search word and I have a command box cmdSearch that the user hits to search I need to know the code I need to search the database inventory table name is tblinvent the field is fldItemRequested and I need to send the results to a datagrid called datinvent if you have any other question or would like the source code Iam using email me @ philippians413usa@yahoo.com
    :
    :
    : Thank you in advance for your help
    :
    :
    : Matthew J. Meahl
    :

    Hi,
    you can just set the RecordSource property of your ADO control and refresh it.

    Here is an example:
    [code]
    Private Sub cmdSearch_Click()
    ADO.RecordSource="Select * FROM tblinvent WHERE fldItemRequested Like " + Chr(34) + txtSearch.Text + "%" + Chr(34)

    datainvent.DataSource=ADO
    End Sub

    Hope this helps!
    [/code]
  • philippians413philippians413 Member Posts: 13
    : : hey guys and gals,
    : :
    : :
    : : I have looked over the posts on this board and I know that this question has been asked and answer a number of times but mine is different so I have to ask it
    : :
    : :
    : : I'am making a database for a friend of mine and I have the Access database made but Iam having trouble search one field I have a textbox named txtSearch where the user enters a search word and I have a command box cmdSearch that the user hits to search I need to know the code I need to search the database inventory table name is tblinvent the field is fldItemRequested and I need to send the results to a datagrid called datinvent if you have any other question or would like the source code Iam using email me @ philippians413usa@yahoo.com
    : :
    : :
    : : Thank you in advance for your help
    : :
    : :
    : : Matthew J. Meahl
    : :
    :
    : Hi,
    : you can just set the RecordSource property of your ADO control and refresh it.
    :
    : Here is an example:
    : [code]
    : Private Sub cmdSearch_Click()
    : ADO.RecordSource="Select * FROM tblinvent WHERE fldItemRequested Like " + Chr(34) + txtSearch.Text + "%" + Chr(34)
    :
    : datainvent.DataSource=ADO
    : End Sub
    :
    : Hope this helps!
    : [/code]
    :



    hey,


    I copied and pasted your code changed what needed to be changed like i changed ADO to the name of my ADO but when I ran the program I got a method or data member not found and I hit debug and in highlighted the .datasource of the datinvent line what did I do wrong Iam using a datagrid and it is called datinvent and there is a datasource prop for it can you help me
  • GogiGogi Member Posts: 258
    : : : hey guys and gals,
    : : :
    : : :
    : : : I have looked over the posts on this board and I know that this question has been asked and answer a number of times but mine is different so I have to ask it
    : : :
    : : :
    : : : I'am making a database for a friend of mine and I have the Access database made but Iam having trouble search one field I have a textbox named txtSearch where the user enters a search word and I have a command box cmdSearch that the user hits to search I need to know the code I need to search the database inventory table name is tblinvent the field is fldItemRequested and I need to send the results to a datagrid called datinvent if you have any other question or would like the source code Iam using email me @ philippians413usa@yahoo.com
    : : :
    : : :
    : : : Thank you in advance for your help
    : : :
    : : :
    : : : Matthew J. Meahl
    : : :
    : :
    : : Hi,
    : : you can just set the RecordSource property of your ADO control and refresh it.
    : :
    : : Here is an example:
    : : [code]
    : : Private Sub cmdSearch_Click()
    : : ADO.RecordSource="Select * FROM tblinvent WHERE fldItemRequested Like " + Chr(34) + txtSearch.Text + "%" + Chr(34)
    : :
    : : datainvent.DataSource=ADO
    : : End Sub
    : :
    : : Hope this helps!
    : : [/code]
    : :
    :
    :
    :
    : hey,
    :
    :
    : I copied and pasted your code changed what needed to be changed like i changed ADO to the name of my ADO but when I ran the program I got a method or data member not found and I hit debug and in highlighted the .datasource of the datinvent line what did I do wrong Iam using a datagrid and it is called datinvent and there is a datasource prop for it can you help me
    :

    Well,I am not sure.Are you using standard DataGrid control or some other control?Did you set the DataSource property of the DataGrid to ADO control at design time?

  • philippians413philippians413 Member Posts: 13
    : : : : hey guys and gals,
    : : : :
    : : : :
    : : : : I have looked over the posts on this board and I know that this question has been asked and answer a number of times but mine is different so I have to ask it
    : : : :
    : : : :
    : : : : I'am making a database for a friend of mine and I have the Access database made but Iam having trouble search one field I have a textbox named txtSearch where the user enters a search word and I have a command box cmdSearch that the user hits to search I need to know the code I need to search the database inventory table name is tblinvent the field is fldItemRequested and I need to send the results to a datagrid called datinvent if you have any other question or would like the source code Iam using email me @ philippians413usa@yahoo.com
    : : : :
    : : : :
    : : : : Thank you in advance for your help
    : : : :
    : : : :
    : : : : Matthew J. Meahl
    : : : :
    : : :
    : : : Hi,
    : : : you can just set the RecordSource property of your ADO control and refresh it.
    : : :
    : : : Here is an example:
    : : : [code]
    : : : Private Sub cmdSearch_Click()
    : : : ADO.RecordSource="Select * FROM tblinvent WHERE fldItemRequested Like " + Chr(34) + txtSearch.Text + "%" + Chr(34)
    : : :
    : : : datainvent.DataSource=ADO
    : : : End Sub
    : : :
    : : : Hope this helps!
    : : : [/code]
    : : :
    : :
    : :
    : :
    : : hey,
    : :
    : :
    : : I copied and pasted your code changed what needed to be changed like i changed ADO to the name of my ADO but when I ran the program I got a method or data member not found and I hit debug and in highlighted the .datasource of the datinvent line what did I do wrong Iam using a datagrid and it is called datinvent and there is a datasource prop for it can you help me
    : :
    :
    : Well,I am not sure.Are you using standard DataGrid control or some other control?Did you set the DataSource property of the DataGrid to ADO control at design time?
    :
    :
    I set the datasource property to the ado at design time but I also tried blanking out the datasource property and I got the same message both times Iam using microsoft DataGrid control 6.0 (OLEDB) does it matter what version of the microsoft Jet engine I use to connect the ADO to the Database




  • GogiGogi Member Posts: 258
    : : : : : hey guys and gals,
    : : : : :
    : : : : :
    : : : : : I have looked over the posts on this board and I know that this question has been asked and answer a number of times but mine is different so I have to ask it
    : : : : :
    : : : : :
    : : : : : I'am making a database for a friend of mine and I have the Access database made but Iam having trouble search one field I have a textbox named txtSearch where the user enters a search word and I have a command box cmdSearch that the user hits to search I need to know the code I need to search the database inventory table name is tblinvent the field is fldItemRequested and I need to send the results to a datagrid called datinvent if you have any other question or would like the source code Iam using email me @ philippians413usa@yahoo.com
    : : : : :
    : : : : :
    : : : : : Thank you in advance for your help
    : : : : :
    : : : : :
    : : : : : Matthew J. Meahl
    : : : : :
    : : : :
    : : : : Hi,
    : : : : you can just set the RecordSource property of your ADO control and refresh it.
    : : : :
    : : : : Here is an example:
    : : : : [code]
    : : : : Private Sub cmdSearch_Click()
    : : : : ADO.RecordSource="Select * FROM tblinvent WHERE fldItemRequested Like " + Chr(34) + txtSearch.Text + "%" + Chr(34)
    : : : :
    : : : : datainvent.DataSource=ADO
    : : : : End Sub
    : : : :
    : : : : Hope this helps!
    : : : : [/code]
    : : : :
    : : :
    : : :
    : : :
    : : : hey,
    : : :
    : : :
    : : : I copied and pasted your code changed what needed to be changed like i changed ADO to the name of my ADO but when I ran the program I got a method or data member not found and I hit debug and in highlighted the .datasource of the datinvent line what did I do wrong Iam using a datagrid and it is called datinvent and there is a datasource prop for it can you help me
    : : :
    : :
    : : Well,I am not sure.Are you using standard DataGrid control or some other control?Did you set the DataSource property of the DataGrid to ADO control at design time?
    : :
    : :
    : I set the datasource property to the ado at design time but I also tried blanking out the datasource property and I got the same message both times Iam using microsoft DataGrid control 6.0 (OLEDB) does it matter what version of the microsoft Jet engine I use to connect the ADO to the Database
    :
    :
    :
    :
    :


    Hi,
    try this:

    [code]
    Private Sub cmdSearch_Click()
    ADO.RecordSource="Select * FROM tblinvent WHERE fldItemRequested Like " + Chr(34) + txtSearch.Text + "%" + Chr(34)

    ADO.Refresh

    End Sub

    [/code]

    Before this,set the DataSource property of the DataGrid to ADO at design time.I think it should work now. ;)
  • philippians413philippians413 Member Posts: 13
    : : : : : : hey guys and gals,
    : : : : : :
    : : : : : :
    : : : : : : I have looked over the posts on this board and I know that this question has been asked and answer a number of times but mine is different so I have to ask it
    : : : : : :
    : : : : : :
    : : : : : : I'am making a database for a friend of mine and I have the Access database made but Iam having trouble search one field I have a textbox named txtSearch where the user enters a search word and I have a command box cmdSearch that the user hits to search I need to know the code I need to search the database inventory table name is tblinvent the field is fldItemRequested and I need to send the results to a datagrid called datinvent if you have any other question or would like the source code Iam using email me @ philippians413usa@yahoo.com
    : : : : : :
    : : : : : :
    : : : : : : Thank you in advance for your help
    : : : : : :
    : : : : : :
    : : : : : : Matthew J. Meahl
    : : : : : :
    : : : : :
    : : : : : Hi,
    : : : : : you can just set the RecordSource property of your ADO control and refresh it.
    : : : : :
    : : : : : Here is an example:
    : : : : : [code]
    : : : : : Private Sub cmdSearch_Click()
    : : : : : ADO.RecordSource="Select * FROM tblinvent WHERE fldItemRequested Like " + Chr(34) + txtSearch.Text + "%" + Chr(34)
    : : : : :
    : : : : : datainvent.DataSource=ADO
    : : : : : End Sub
    : : : : :
    : : : : : Hope this helps!
    : : : : : [/code]
    : : : : :
    : : : :
    : : : :
    : : : :
    : : : : hey,
    : : : :
    : : : :
    : : : : I copied and pasted your code changed what needed to be changed like i changed ADO to the name of my ADO but when I ran the program I got a method or data member not found and I hit debug and in highlighted the .datasource of the datinvent line what did I do wrong Iam using a datagrid and it is called datinvent and there is a datasource prop for it can you help me
    : : : :
    : : :
    : : : Well,I am not sure.Are you using standard DataGrid control or some other control?Did you set the DataSource property of the DataGrid to ADO control at design time?
    : : :
    : : :
    : : I set the datasource property to the ado at design time but I also tried blanking out the datasource property and I got the same message both times Iam using microsoft DataGrid control 6.0 (OLEDB) does it matter what version of the microsoft Jet engine I use to connect the ADO to the Database
    : :
    : :
    : :
    : :
    : :
    :
    :
    : Hi,
    : try this:
    :
    : [code]
    : Private Sub cmdSearch_Click()
    : ADO.RecordSource="Select * FROM tblinvent WHERE fldItemRequested Like " + Chr(34) + txtSearch.Text + "%" + Chr(34)
    :
    : ADO.Refresh
    :
    : End Sub
    :
    : [/code]
    :
    : Before this,set the DataSource property of the DataGrid to ADO at design time.I think it should work now. ;)
    :


    nope that doesn't work I get a syntax error in from clause

    btw I remembered reading somewhere that when you call the ado you have to include the form name ex. frmView.adoInvent.refresh is that true or am I remembering wrong
  • GogiGogi Member Posts: 258
    : : : : : : : hey guys and gals,
    : : : : : : :
    : : : : : : :
    : : : : : : : I have looked over the posts on this board and I know that this question has been asked and answer a number of times but mine is different so I have to ask it
    : : : : : : :
    : : : : : : :
    : : : : : : : I'am making a database for a friend of mine and I have the Access database made but Iam having trouble search one field I have a textbox named txtSearch where the user enters a search word and I have a command box cmdSearch that the user hits to search I need to know the code I need to search the database inventory table name is tblinvent the field is fldItemRequested and I need to send the results to a datagrid called datinvent if you have any other question or would like the source code Iam using email me @ philippians413usa@yahoo.com
    : : : : : : :
    : : : : : : :
    : : : : : : : Thank you in advance for your help
    : : : : : : :
    : : : : : : :
    : : : : : : : Matthew J. Meahl
    : : : : : : :
    : : : : : :
    : : : : : : Hi,
    : : : : : : you can just set the RecordSource property of your ADO control and refresh it.
    : : : : : :
    : : : : : : Here is an example:
    : : : : : : [code]
    : : : : : : Private Sub cmdSearch_Click()
    : : : : : : ADO.RecordSource="Select * FROM tblinvent WHERE fldItemRequested Like " + Chr(34) + txtSearch.Text + "%" + Chr(34)
    : : : : : :
    : : : : : : datainvent.DataSource=ADO
    : : : : : : End Sub
    : : : : : :
    : : : : : : Hope this helps!
    : : : : : : [/code]
    : : : : : :
    : : : : :
    : : : : :
    : : : : :
    : : : : : hey,
    : : : : :
    : : : : :
    : : : : : I copied and pasted your code changed what needed to be changed like i changed ADO to the name of my ADO but when I ran the program I got a method or data member not found and I hit debug and in highlighted the .datasource of the datinvent line what did I do wrong Iam using a datagrid and it is called datinvent and there is a datasource prop for it can you help me
    : : : : :
    : : : :
    : : : : Well,I am not sure.Are you using standard DataGrid control or some other control?Did you set the DataSource property of the DataGrid to ADO control at design time?
    : : : :
    : : : :
    : : : I set the datasource property to the ado at design time but I also tried blanking out the datasource property and I got the same message both times Iam using microsoft DataGrid control 6.0 (OLEDB) does it matter what version of the microsoft Jet engine I use to connect the ADO to the Database
    : : :
    : : :
    : : :
    : : :
    : : :
    : :
    : :
    : : Hi,
    : : try this:
    : :
    : : [code]
    : : Private Sub cmdSearch_Click()
    : : ADO.RecordSource="Select * FROM tblinvent WHERE fldItemRequested Like " + Chr(34) + txtSearch.Text + "%" + Chr(34)
    : :
    : : ADO.Refresh
    : :
    : : End Sub
    : :
    : : [/code]
    : :
    : : Before this,set the DataSource property of the DataGrid to ADO at design time.I think it should work now. ;)
    : :
    :
    :
    : nope that doesn't work I get a syntax error in from clause
    :
    : btw I remembered reading somewhere that when you call the ado you have to include the form name ex. frmView.adoInvent.refresh is that true or am I remembering wrong
    :

    It works for me. :(
    Regarding form name,you have to include it only if your control (i.e.ADO) is on another form.

    Is the format of your field in the database set to Text?

  • philippians413philippians413 Member Posts: 13
    : : : : : : : : hey guys and gals,
    : : : : : : : :
    : : : : : : : :
    : : : : : : : : I have looked over the posts on this board and I know that this question has been asked and answer a number of times but mine is different so I have to ask it
    : : : : : : : :
    : : : : : : : :
    : : : : : : : : I'am making a database for a friend of mine and I have the Access database made but Iam having trouble search one field I have a textbox named txtSearch where the user enters a search word and I have a command box cmdSearch that the user hits to search I need to know the code I need to search the database inventory table name is tblinvent the field is fldItemRequested and I need to send the results to a datagrid called datinvent if you have any other question or would like the source code Iam using email me @ philippians413usa@yahoo.com
    : : : : : : : :
    : : : : : : : :
    : : : : : : : : Thank you in advance for your help
    : : : : : : : :
    : : : : : : : :
    : : : : : : : : Matthew J. Meahl
    : : : : : : : :
    : : : : : : :
    : : : : : : : Hi,
    : : : : : : : you can just set the RecordSource property of your ADO control and refresh it.
    : : : : : : :
    : : : : : : : Here is an example:
    : : : : : : : [code]
    : : : : : : : Private Sub cmdSearch_Click()
    : : : : : : : ADO.RecordSource="Select * FROM tblinvent WHERE fldItemRequested Like " + Chr(34) + txtSearch.Text + "%" + Chr(34)
    : : : : : : :
    : : : : : : : datainvent.DataSource=ADO
    : : : : : : : End Sub
    : : : : : : :
    : : : : : : : Hope this helps!
    : : : : : : : [/code]
    : : : : : : :
    : : : : : :
    : : : : : :
    : : : : : :
    : : : : : : hey,
    : : : : : :
    : : : : : :
    : : : : : : I copied and pasted your code changed what needed to be changed like i changed ADO to the name of my ADO but when I ran the program I got a method or data member not found and I hit debug and in highlighted the .datasource of the datinvent line what did I do wrong Iam using a datagrid and it is called datinvent and there is a datasource prop for it can you help me
    : : : : : :
    : : : : :
    : : : : : Well,I am not sure.Are you using standard DataGrid control or some other control?Did you set the DataSource property of the DataGrid to ADO control at design time?
    : : : : :
    : : : : :
    : : : : I set the datasource property to the ado at design time but I also tried blanking out the datasource property and I got the same message both times Iam using microsoft DataGrid control 6.0 (OLEDB) does it matter what version of the microsoft Jet engine I use to connect the ADO to the Database
    : : : :
    : : : :
    : : : :
    : : : :
    : : : :
    : : :
    : : :
    : : : Hi,
    : : : try this:
    : : :
    : : : [code]
    : : : Private Sub cmdSearch_Click()
    : : : ADO.RecordSource="Select * FROM tblinvent WHERE fldItemRequested Like " + Chr(34) + txtSearch.Text + "%" + Chr(34)
    : : :
    : : : ADO.Refresh
    : : :
    : : : End Sub
    : : :
    : : : [/code]
    : : :
    : : : Before this,set the DataSource property of the DataGrid to ADO at design time.I think it should work now. ;)
    : : :
    : :
    : :
    : : nope that doesn't work I get a syntax error in from clause
    : :
    : : btw I remembered reading somewhere that when you call the ado you have to include the form name ex. frmView.adoInvent.refresh is that true or am I remembering wrong
    : :
    :
    : It works for me. :(
    : Regarding form name,you have to include it only if your control (i.e.ADO) is on another form.
    :
    : Is the format of your field in the database set to Text?
    :
    :
    yes the format of the field is text I tried deleting the project and redoing everything and I got the same error message I tried commenting out the ado.refresh line I didn't get the error message but nothing happen could it be the refresh line it has problems with
  • GogiGogi Member Posts: 258
    : : : : : : : : : hey guys and gals,
    : : : : : : : : :
    : : : : : : : : :
    : : : : : : : : : I have looked over the posts on this board and I know that this question has been asked and answer a number of times but mine is different so I have to ask it
    : : : : : : : : :
    : : : : : : : : :
    : : : : : : : : : I'am making a database for a friend of mine and I have the Access database made but Iam having trouble search one field I have a textbox named txtSearch where the user enters a search word and I have a command box cmdSearch that the user hits to search I need to know the code I need to search the database inventory table name is tblinvent the field is fldItemRequested and I need to send the results to a datagrid called datinvent if you have any other question or would like the source code Iam using email me @ philippians413usa@yahoo.com
    : : : : : : : : :
    : : : : : : : : :
    : : : : : : : : : Thank you in advance for your help
    : : : : : : : : :
    : : : : : : : : :
    : : : : : : : : : Matthew J. Meahl
    : : : : : : : : :
    : : : : : : : :
    : : : : : : : : Hi,
    : : : : : : : : you can just set the RecordSource property of your ADO control and refresh it.
    : : : : : : : :
    : : : : : : : : Here is an example:
    : : : : : : : : [code]
    : : : : : : : : Private Sub cmdSearch_Click()
    : : : : : : : : ADO.RecordSource="Select * FROM tblinvent WHERE fldItemRequested Like " + Chr(34) + txtSearch.Text + "%" + Chr(34)
    : : : : : : : :
    : : : : : : : : datainvent.DataSource=ADO
    : : : : : : : : End Sub
    : : : : : : : :
    : : : : : : : : Hope this helps!
    : : : : : : : : [/code]
    : : : : : : : :
    : : : : : : :
    : : : : : : :
    : : : : : : :
    : : : : : : : hey,
    : : : : : : :
    : : : : : : :
    : : : : : : : I copied and pasted your code changed what needed to be changed like i changed ADO to the name of my ADO but when I ran the program I got a method or data member not found and I hit debug and in highlighted the .datasource of the datinvent line what did I do wrong Iam using a datagrid and it is called datinvent and there is a datasource prop for it can you help me
    : : : : : : :
    : : : : : :
    : : : : : : Well,I am not sure.Are you using standard DataGrid control or some other control?Did you set the DataSource property of the DataGrid to ADO control at design time?
    : : : : : :
    : : : : : :
    : : : : : I set the datasource property to the ado at design time but I also tried blanking out the datasource property and I got the same message both times Iam using microsoft DataGrid control 6.0 (OLEDB) does it matter what version of the microsoft Jet engine I use to connect the ADO to the Database
    : : : : :
    : : : : :
    : : : : :
    : : : : :
    : : : : :
    : : : :
    : : : :
    : : : : Hi,
    : : : : try this:
    : : : :
    : : : : [code]
    : : : : Private Sub cmdSearch_Click()
    : : : : ADO.RecordSource="Select * FROM tblinvent WHERE fldItemRequested Like " + Chr(34) + txtSearch.Text + "%" + Chr(34)
    : : : :
    : : : : ADO.Refresh
    : : : :
    : : : : End Sub
    : : : :
    : : : : [/code]
    : : : :
    : : : : Before this,set the DataSource property of the DataGrid to ADO at design time.I think it should work now. ;)
    : : : :
    : : :
    : : :
    : : : nope that doesn't work I get a syntax error in from clause
    : : :
    : : : btw I remembered reading somewhere that when you call the ado you have to include the form name ex. frmView.adoInvent.refresh is that true or am I remembering wrong
    : : :
    : :
    : : It works for me. :(
    : : Regarding form name,you have to include it only if your control (i.e.ADO) is on another form.
    : :
    : : Is the format of your field in the database set to Text?
    : :
    : :
    : yes the format of the field is text I tried deleting the project and redoing everything and I got the same error message I tried commenting out the ado.refresh line I didn't get the error message but nothing happen could it be the refresh line it has problems with
    :

    Make sure you set RecordSource property to 1-adCmdText at Design-Time( ADO control).

    If anyone else knows something about this,please post it here.

  • philippians413philippians413 Member Posts: 13
    : : : : : : : : : : hey guys and gals,
    : : : : : : : : : :
    : : : : : : : : : :
    : : : : : : : : : : I have looked over the posts on this board and I know that this question has been asked and answer a number of times but mine is different so I have to ask it
    : : : : : : : : : :
    : : : : : : : : : :
    : : : : : : : : : : I'am making a database for a friend of mine and I have the Access database made but Iam having trouble search one field I have a textbox named txtSearch where the user enters a search word and I have a command box cmdSearch that the user hits to search I need to know the code I need to search the database inventory table name is tblinvent the field is fldItemRequested and I need to send the results to a datagrid called datinvent if you have any other question or would like the source code Iam using email me @ philippians413usa@yahoo.com
    : : : : : : : : : :
    : : : : : : : : : :
    : : : : : : : : : : Thank you in advance for your help
    : : : : : : : : : :
    : : : : : : : : : :
    : : : : : : : : : : Matthew J. Meahl
    : : : : : : : : : :
    : : : : : : : : :
    : : : : : : : : : Hi,
    : : : : : : : : : you can just set the RecordSource property of your ADO control and refresh it.
    : : : : : : : : :
    : : : : : : : : : Here is an example:
    : : : : : : : : : [code]
    : : : : : : : : : Private Sub cmdSearch_Click()
    : : : : : : : : : ADO.RecordSource="Select * FROM tblinvent WHERE fldItemRequested Like " + Chr(34) + txtSearch.Text + "%" + Chr(34)
    : : : : : : : : :
    : : : : : : : : : datainvent.DataSource=ADO
    : : : : : : : : : End Sub
    : : : : : : : : :
    : : : : : : : : : Hope this helps!
    : : : : : : : : : [/code]
    : : : : : : : : :
    : : : : : : : :
    : : : : : : : :
    : : : : : : : :
    : : : : : : : : hey,
    : : : : : : : :
    : : : : : : : :
    : : : : : : : : I copied and pasted your code changed what needed to be changed like i changed ADO to the name of my ADO but when I ran the program I got a method or data member not found and I hit debug and in highlighted the .datasource of the datinvent line what did I do wrong Iam using a datagrid and it is called datinvent and there is a datasource prop for it can you help me
    : : : : : : : :
    : : : : : : :
    : : : : : : : Well,I am not sure.Are you using standard DataGrid control or some other control?Did you set the DataSource property of the DataGrid to ADO control at design time?
    : : : : : : :
    : : : : : : :
    : : : : : : I set the datasource property to the ado at design time but I also tried blanking out the datasource property and I got the same message both times Iam using microsoft DataGrid control 6.0 (OLEDB) does it matter what version of the microsoft Jet engine I use to connect the ADO to the Database
    : : : : : :
    : : : : : :
    : : : : : :
    : : : : : :
    : : : : : :
    : : : : :
    : : : : :
    : : : : : Hi,
    : : : : : try this:
    : : : : :
    : : : : : [code]
    : : : : : Private Sub cmdSearch_Click()
    : : : : : ADO.RecordSource="Select * FROM tblinvent WHERE fldItemRequested Like " + Chr(34) + txtSearch.Text + "%" + Chr(34)
    : : : : :
    : : : : : ADO.Refresh
    : : : : :
    : : : : : End Sub
    : : : : :
    : : : : : [/code]
    : : : : :
    : : : : : Before this,set the DataSource property of the DataGrid to ADO at design time.I think it should work now. ;)
    : : : : :
    : : : :
    : : : :
    : : : : nope that doesn't work I get a syntax error in from clause
    : : : :
    : : : : btw I remembered reading somewhere that when you call the ado you have to include the form name ex. frmView.adoInvent.refresh is that true or am I remembering wrong
    : : : :
    : : :
    : : : It works for me. :(
    : : : Regarding form name,you have to include it only if your control (i.e.ADO) is on another form.
    : : :
    : : : Is the format of your field in the database set to Text?
    : : :
    : : :
    : : yes the format of the field is text I tried deleting the project and redoing everything and I got the same error message I tried commenting out the ado.refresh line I didn't get the error message but nothing happen could it be the refresh line it has problems with
    : :
    :
    : Make sure you set RecordSource property to 1-adCmdText at Design-Time( ADO control).
    :
    : If anyone else knows something about this,please post it here.
    :
    :
    hey I check and I have it set on 2-adcmdTable and when I go to change it to 1-adcmdText give you error since nothing is in the SQL statement box on the recordSource property I dont know any SQL programming so I have no clue on what to put in it do you know what I should enter in the box
«1
Sign In or Register to comment.