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

Comments

  • : 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 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
  • : : : 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?

  • : : : : 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




  • : : : : : 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. ;)
  • : : : : : : 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
  • : : : : : : : 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?

  • : : : : : : : : 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
  • : : : : : : : : : 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 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
  • : 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
    :


    Enter this to that Textbox:
    Select * FROM tblinvent

    This code will get you all the records from tblinvent table.
    Now,when you have RecordSource set to 1-adCmdText,try the code for searching again.

  • : : 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
    : :
    :
    :
    : Enter this to that Textbox:
    : Select * FROM tblinvent
    :
    : This code will get you all the records from tblinvent table.
    : Now,when you have RecordSource set to 1-adCmdText,try the code for searching again.
    :
    :
    It worked I have the recordSource set to 1-adCemText and the search works fine thank you for all of your help and Iam going to move on to the next database

Sign In or Register to comment.

Howdy, Stranger!

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

Categories