Maybe I'm missing something, but why don't you just link the SQL (episode?) table using ODBC (File / Get External Data / Link) and append into it that way? You could still use code to update it. You don't need the myrs variable for the recordset. Just run the SQL string for the append query...
Once you open a recordset, you can use the "fields" object to find the number of columns using the .Fields.Count property. Look at the following excerpt from some code.
For Each tbl In cat.Tables 'Cycle through every table in the database excluding system tables
If Left(tbl.Name, 4)...
From VBA you can easily refer to a control on a subform. The syntax is:
Me.Subform.Form!ControlName
So if you have a subform named sfrmInvoice and a control named DueDate, the syntax would be:
Me.sfrmInvoice.Form!DueDate
You can retrieve the value from your subform control in VBA or in the...
I would start with the QueryDef object. You can easily change the SQL property, which is the SQL string, by replacing the table/query name with a variable and concatenating it with the rest of the string. For example, you could have a string like so:
sSQL = "Select * from " & TableName
The...
Look closely at the "Range" (last) action argument in a "transfer spreadsheet" action of a macro. Here is an example of how to grab a particular sheet.
Edited Data!A1:I1200
Once you create the macro, just right click on it and save it as a module if you want to execute it in VBA. You'll wind...
I need more information before I can help you. It sounds like these global variables are object variables and object variables must be set with a VBA statement. You said that most of your variables reference a recordset.
It sounds like you want your subform variables to be available in your...
Here is another version of the same thing using the MSgBox function.
Sub Userlist()
Const dbSecUserRosterGuid = "{947bb102-5d43-11d1-bdbf-00c04fb92675}"
Dim rs As ADODB.Recordset, sList As String
Dim con As ADODB.Connection
Set con = CurrentProject.Connection
Set rs =...
Sub Procedure
You don't have to create a function to run a sub procedure. You can run it from the immediate window or just click on the "play" button from the Visual Basic editor. Or you can call it any number of ways. You can also use a data definition query to create a table and run it...
You can set up a table with three fields: low, high and the value you want to post for each range. The table will look something like this:
LOW HIGH VALUE
1 500 40
501 1,000 70
1,001 2,500 90
and so on..
Next, set up a query based on these...
This is my first post of this forum. Here is my situation. I have a data access page that I created from a Microsoft Access Project on our intranet website. From vbscript, I can tell who logs on, but it only works when used from my computer desktop. Any user who logs on has to be able to "see"...