A
amitbadgi
hi guys i have written this query and attached it as a macro to an
access form ,
SELECT DISTINCT [dbo_businessNC].[bus_id], [dbo_businessNC].[bus_name],
[dbo_businessNC].[adrs1], [dbo_businessNC].[city],
[dbo_businessNC].[state], [dbo_businessNC].[zip],
[dbo_businessNC].[phone], [dbo_occhistoryNC].[license]
FROM dbo_businessNC, dbo_occhistoryNC
WHERE ([dbo_occhistoryNC].[bus_id]=[Forms].[Form1].[Text2]) And
([dbo_businessNC].[bus_name] Like "*" & [Forms].[Form1].[Text5] & "*")
And ([dbo_businessNC].[adrs1] Like "*" & [Forms].[Form1].[Text8] & "*")
And ([dbo_businessNC].[phone] Like "*" & [Forms].[Form1].[Text10] &
"*") And ([dbo_businessNC].[zip] Like "*" & [Forms].[Form1].[Text15] &
"*") AND (dbo_businessNC.bus_id=dbo_occhistoryNC.bus_id);
In teh access form when I enter the bus_id, its workign fine for most
of the Ids, but doesnt show any result for a few Bus_Id which is
available in both dbo_businessNC and dbo_occhistoryNC tables. I just
wanted to make sure if teh query was right. Thankyou,
access form ,
SELECT DISTINCT [dbo_businessNC].[bus_id], [dbo_businessNC].[bus_name],
[dbo_businessNC].[adrs1], [dbo_businessNC].[city],
[dbo_businessNC].[state], [dbo_businessNC].[zip],
[dbo_businessNC].[phone], [dbo_occhistoryNC].[license]
FROM dbo_businessNC, dbo_occhistoryNC
WHERE ([dbo_occhistoryNC].[bus_id]=[Forms].[Form1].[Text2]) And
([dbo_businessNC].[bus_name] Like "*" & [Forms].[Form1].[Text5] & "*")
And ([dbo_businessNC].[adrs1] Like "*" & [Forms].[Form1].[Text8] & "*")
And ([dbo_businessNC].[phone] Like "*" & [Forms].[Form1].[Text10] &
"*") And ([dbo_businessNC].[zip] Like "*" & [Forms].[Form1].[Text15] &
"*") AND (dbo_businessNC.bus_id=dbo_occhistoryNC.bus_id);
In teh access form when I enter the bus_id, its workign fine for most
of the Ids, but doesnt show any result for a few Bus_Id which is
available in both dbo_businessNC and dbo_occhistoryNC tables. I just
wanted to make sure if teh query was right. Thankyou,