Howdy, Stranger!

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

Categories

concotenate query string

Hi!,
i want to concatenate 2 fields for search the data, im using vb6, and access 2002.
i have to look for the two fields, 1 is date field(search between 2 dates)
and 2 is string field.
im using combobox for selecting certain item,and date picker to select date.
how can i concatenate two different type of fields and look for my filter data?
plz provide the eg, query string!.
shah

Comments

  • GogiGogi Member Posts: 258
    [b][red]This message was edited by Moderator at 2005-5-17 2:16:6[/red][/b][hr]
    : Hi!,
    : i want to concatenate 2 fields for search the data, im using vb6, and access 2002.
    : i have to look for the two fields, 1 is date field(search between 2 dates)
    : and 2 is string field.
    : im using combobox for selecting certain item,and date picker to select date.
    : how can i concatenate two different type of fields and look for my filter data?
    : plz provide the eg, query string!.
    : shah
    :
    :

    I think you can write something like this:

    [code]
    Dim QueryString As String
    QueryString="Select * FROM YourTable WHERE YourField='Something' AND DateField=#YourDate#"
    [/code]

    After you have the QueryString,just use it as RecordSource of your ADO control,and it should return the filtered results.

    Hope this helps!


Sign In or Register to comment.