Heres what i want to do.

I want to check the two fields in my table | I use Ms Access
the fields are EmployeeID | StartingDayWork

Sql = "Select * from Employees where EmployeeId = '" & txtID.text & "'" 'This is running

but whenever i add StartingDayWork it always said syntax error. Any1 here who knows the correct sql command/syntax for this?. Need Help Guyz.

If you want to include StartingWorkDay in the where clause the SQL would be

SELECT * FROM Employees WHERE EmployeeId = '" + txtID.Text + "' AND StartingWorkDay = '" + txtStartingWorkDay.Text + "';"

you may have been missing the AND and using a comma?

will try

Correct code is:

thnx brother i got the idea i feel dumb xD just simple pattern cant get -.-

please mark this thread solved , as you get the answer. so that others may find it helpful and they saved their time.

Regards

how to mark it as solve i cant see the button .

at the buttom of the page there is a button " mark as asnwered" or something.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.