Why don't you set the form fields as criteria expression within your query.
ex - open the query in design mode, and in the employee field's criteria put: Forms!YourForm!EmployeeField
Now when you use the OpenQuery action of the DoCmd object, it will be limited to the employee listed on the form.
You must add a reference to the ADOX library.
Go to:
Tools->References
Then check:
Microsoft DAO 3.x Object Library and click OK
Now everything should work.
The easiest way is to create a query
SELECT Employee FROM EMPLOYEES;
Then, in the recordsource property of the lstEmpName, select the query that you created.
There are also many other ways to do this, let me know if this doesn't suit your needs.
The easiest way to perform this task is:
In the event procedure of the OnClick event for the command button, enter this code...
Dim strSQL as string
strSQL = "INSERT INTO yourTable ([yourCol]) VALUES (" & Me.yourTextBox & ");"
DoCmd.RunSQL strSQL
Actually there is a very easy way to do so...
Simply use the file dialog class:
I don't really feel like explaining it all, but its actually REALLY easy to use...here is a code snippit...
Private Sub cmdSelectInput_Click()
Dim varItem As Variant
With...
Simply create a third table i.e. tblWorkStationLicenses that with the following fields and types:
idxWorkstationID (long int)
nID (long int)
Now, this table can used to store a workstationID and a license id, thereby joining the two tables. You can also associate workstations to multiple...
Hello!
I am in dire need of assistance...I am trying to import data from a .nsf lotus notes db to a MS Access db. I understand how to create the ODBC connection, and I have imported tables using the views in the .nsf file, but the actual data that I need is in a form document within the .nsf...
Hello!
I am in dire need of assistance...I am trying to import data from a .nsf lotus notes db to a MS Access db. I understand how to create the ODBC connection, and I have imported tables using the views in the .nsf file, but the actual data that I need is in a form document within the .nsf...
You can use the "LIKE" operator in the query.
for instance:
"SELECT Left(sys_dns, InStr(sys_dns, ".") - 1) As sys_name FROM [Performance table]"
If you are going to open up a recordset using a predefined qry, you must use the following code.
Dim db as DAO.Database
Dim rst as DAO.recordset
Dim prm as DAO.parameter
Dim qdf as DAO.queryDef
Set db = currentdb
Set qdf = db.QueryDefs("qry_Quality_Scores")
For Each prm In...
You can use this code, where <table> is the name of the table that you want to delete
Dim strSQL as String
strSQL = "DROP TABLE <table>;"
DoCmd.RunSQL strSQL
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.