
I am probably the most active member on this forum, yet I give solutions every day. In my case, I am the project director for a software development company. As with many, they are also students or have employment. You must keep in mind that any solution that you do get here is from members that are giving their own free time to help others out.

You have asked a question, I gave you the answer, still you want me to do your entire project, which is not allowed here. I was not mean, just upholding our rules here on Daniweb. If Text1.Text = "Click here to enter username" Then 'Err message if the user enters a record either username or password that is not on the database MsgBox "This user does not exist.", vbCritical, "Log In Error" 'Err message if the password entered isn't on the Password Field of the Database Table MsgBox "Password incorrect." & vbCrLf & " Attempt left " & passattemp & vbNullString, vbExclamation, "Log In Error"

'Err message if the user failed to login with a valid username and pass 3 times Program will close.", vbCritical, "Log In Error"

'all command buttons are set to Enable to False except inventory part and exit 'all command buttons are set to Enable = True If rs.Fields("username").Value = "admin" Then ' UserType is the Table Field which has values of admin or user MsgBox "Welcome to The System!", vbInformation, "Log-in Success" If Text2.Text = rs!Password And Text1.Text = rs!UserName Then 'Use the same when you are adding stock, just mark 'To get a value or deduct an item, the following. 'rs.Open "SELECT * FROM INVENTORY WHERE ItemNameHere LIKE '" & Text1.Text & "%'", db, adOpenStatic, adLockOptimistic 'Search for all items say starting with W, which will show say wires, wood etc. 'rs.Open "SELECT * FROM INVENTORY WHERE ItemNameHere = '" & Text1.Text & "'", db, adOpenStatic, adLockOptimistic 'The following sql statements can be used in your other forms. Rs.Open "select * from login where username = '" & Text1 & "'", db, adOpenStatic, adLockOptimistic MsgBox "Data required, please enter a valid username and password!", vbCritical, "Log-in Error"ĭb.Open "PROVIDER=.4.0 Data Source=" & App.Path & "\database1.mdb" If Text1.Text = vbNullString And Text2.Text = vbNullString Then 'we do not use "" '# Set a reference to MS ActiveX data objects first before ADO can be used!! I must just iterate again, we normally do not rewrite code for posters, you did however do a lot of coding from your side, no harm no foul. When done, please mark this as solved, found at the end of this page.:) I gave you all the other scenarios on how to control the stock etc.
.png)
Delete all your data controls and start making use of ADO as in the code below. This is how you would handle all the other forms. I have not corrected all your code in your forms, only in form 2. Only because I'm in a good mood today!!!! )
