Listboxes can be a tricky thing. They almost always require some programming. If you want the first listbox to show only employees that are related to the foreman you select in the combobox then I would base the listbox's rowsource on a parameter query that pulls the value from the combobox...
Not positive but I don't think the max records feature is what is preventing the recordset from being updateable. It probably has to do with the table you added.
What is the relationship between the two tables and are you trying to change data in fields from both tables or just one?
First off I would create a table to house information about the players. Have a primary key and any other information that you want to include about the players.
Then create another table for games. Create a primary key with other information about the games.
Then create another table for...
The two tables that you want to combine probably have similar fields. You can probably create a table with all those fields plus one to identify whether they are part of the staff or the external.
Are you saying you want it to set the criteria for a query or actually open different queries based on the selection.
I've setup listboxes for people to allow them to choose a report to run. The way I did that was create a table where the first field contained the name of the report and the...
Tried switching it to ErrHandler but still had the same problem.
How do you turn it off?
Public Sub fInternal(dtmStart As Date, dtmEnd As Date)
'Exports Checks queries to Internal excel template
On Error GoTo ErrHandler
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim rstData As...
Has anyone ever had their error handler not work the way it should.
I've got a sub that I've declared at the top On Error GoTo Err
At the bottom I've got Err:
And I have a specific action to take based on err number 3021.
But when I run the sub it still gives me the plain old error message...
I don't know it well enough to tell you. I've barely dabbled in it as my boss doesn't seem to think that we need an SQL Server for 150 users! Go figure.
But good luck to you.
Slightly different
Dim XLApp as Excel.Application
Dim XLBook as Excel.Workbook
Dim XLSheet as Excel.WorkSheet
Set XLApp = CreateObject("Excel.Application")
Set XLBook=Set XLBook = Workbooks.Open("J:\Tax\Outsourcing\CP\Cash Database Report Internal Master.xlt")
Set...
I've just created my first sub to open an excel template and take the data from a query and place it in the proper place on a worksheet.
Two things are happening that have got me confused.
One - I have to close the db in order to open the excel file. I've set all my object variables to...
Bosses can really get annoying can't they?
Well then, create a field in your query:
IIF(isnull(Dlookup("[IDField]","[TableName]","[IDField]=" & [IDField] & " And DatePart("m",[DateField])=" & [MonthNumber]), "No","Yes")
Wouldn't it just be easier to list all the products that have a violation during the time period instead of listing all of them and giving a yes or a no?
VB -- It's not that much work to create a sub that would save the data. Here's an example:
Dim rst as DAO.Recordset
Dim ctl as Control
Set rst=CurrentDb.OpenRecordset("TableName",DBOpenDynaset)
With rst
.AddNew
For each ctl in Forms!FormName.Controls
If TypeOf ctl is Textbox or TypeOf ctl...