I am running a simple excel app within Access. I am opening a new workbook, adding data, formatting the sheet ect. It works quite well the first time I run it (click event). The next time it fails with "Error 91 - Object variable or With block variable not set". Here is the first part of the code and the location where it fails on the second try:
Private Sub CalcPercent_Cli ck()
DELCLARATIONS:
...
Search Result
Collapse
351 results in 0.0033 seconds.
Keywords
Members
Tags
-
Error 91 - Object variable or With block variable not set
-
Sql - insert into
I have an sql statement which I was hoping someone may be able to help me with. I'm getting the following errors:
1 - runtime error 3346 (Number of query values and destination values are not the same
2 - Runtime Error 3075 syntax
...Code:strSql = "INSERT INTO tblConversation ( " & _ "RecordID, LeadID, Conversation, Subject, DateEntered, ContactDate, ContactTime, FollowUpDate -
How To Get External IP Address via VB/VBA
This uses HTML scraping of this site:
http://whatismyipaddre ss.com/
Code can be changed to work with other sites if you're comfortable with String manipulation
Paste this into a Module and run.
Cheers!
Trip
...Code:Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal
-
auto table update of mysql database from access database
Is there any way the table data in Mysql will be automatically updated from the Access database after exporting the first time?
My Access table is updated every hour. How can i synchronize the transfer of data between the two database? -
DLookUp function doesn't want to work with my code
...Code:Private Sub Command11_Click() Dim strSQL As String Dim criteria As Integer Dim ete As String Dim row, place As Integer ete = Me!etenduse_nimi row = Me!Rida place = Me!number criteria = DLookup("[broneeringu_id]", "BroneeringudQ", " etenduse_nimi='" & ete & "' AND rida=" & row & " AND number=" & place & " AND Toimumisaeg=" -
Changing RecordSource in code problem
Hello.
I am trying to change a RecordSource (query) of a subform based on user selection in another form.
In the code below I am setting the same query as defined on the subform (Property RecordSource), but it returns no records at all.
...Code:Private Sub ID_Click() Dim fetchedId As Integer Dim sql As String With Me.Form.Recordset Me.Parent.Form!IdHolder = .Fields("Id") -
cascade combobox problem.
I have two comboboxes on a subform.The first combobox is used to populate the second combobox.These are placed in the detail section of the form.I want them to work this way:when I select any value from the first combobox,I want the second combobox of the same row to get populated by relevant value.
As of now, I have tried to implement this and as I select any value from the first combobox of row 1 I see the second combobox of the same row... -
ODBC call failed in ms access 2007.
Run-time error ‘3146’:
ODBC—call failed.
[Microsoft][ODBC SQL SERVER Driver][SQL Server]The ORDER BY position number 0 is out of range of the number of items in the select list.(#108)
The text above is the error that I am getting when I try to sort a column in my form.I am not able to understand what this error is supposed to mean.
Here is the code that I am using to sort the column,in case required.... -
What's wrong with this query?
This query works in the query design window but doesn't display any data in the combobox in the form.
...Code:select distinct '<ALL>' as equipment from tblmimain UNION ALL SELECT DISTINct tblMIMAIN.A_EQUIPDESCR AS Equipment FROM tblMIMAIN WHERE (((tblMIMAIN.A_LOCATION)>IIf (GetAsset()="**ALL**","a","ZZ") Or (tblMIMAIN.A_LOCATION) =GetAsset()) AND ((tblMIMAIN.A_SYSTEM)="NEN"))
-
How to clear filter to display all data in ms access 2007?
I have a combobox that filters data on the form in the afterupdate event.
Following is the query I have been trying to use to filter data.This code filters data effectively but the problem that I am facing is that when I select "<ALL>" from the combobox no data is displayed.What could be wrong?How can I display all the data of the form on selection of "<ALL>"
...Code:Dim strCriteria As String strCriteria
-
How to use SQL query in VBA function?
I am using Access 2010. I have a database that consists of bookings, receipts, clients and so on. I have made a form for booking tickets. The first field I have on my form is a combobox where a user can choose the username. And the second (receiptID) field should be filled automatically after the user has chosen appropriate username. I have an idea how to fill that field but what i don't have are the skills.
My Receipts table has these fields:... -
Adding 'ALL' in rowsource of combobox.
I have acombobox used to filter data on selection of any value.I want to add a value 'ALL' in my combobox for users to select all the values i.e. remove filtering.union all is not working somehow.Here's the query:
...Code:[*]SELECT DISTINCTROW tblMIMAIN.A_JOBNO AS Jobno, tblMIMAIN.A_EQUIPDESCR AS Equipment, tblMIMAIN.A_LOCATION AS Location, tblMIMAIN.A_ID, IIf(IsNull(tblMIMAIN!A_PROJECTID)," ","**13Mplan**") AS 13Months
-
Bryan AZ started a topic DoCmd.TransferText acImportDelim is appending data; I need it overwrite...how to do?in AccessDoCmd.TransferText acImportDelim is appending data; I need it overwrite...how to do?
I am using DoCmd.TransferT ext acImportDelim to import a number of text files. I thought this command would overwrite current table data with new, but instead, it is appending.
How do I get this command to overwrite the current table with new data each month? -
How to sort date column in ms access?
I need to sort a field that displays date on a form.This field is a textbox that simply displays a column 'date' from sql database i.e. it is not of type datetime when displayed.I had two ideas in mind; either I can convert the format to yyyy/mm/dd which helps sorting text or I should convert text into date format and then sort it.The problem in the first one is that even if I convert to yyyy/mm/dd I need to display as mm/dd/yyyy and the problem... -
Excel VBA
Good afternoon, I am trying to transfer information from my Excel User Form into the database table. After searching vigourously on the internet, I came across this formula to find the next empty row:
...Code:Private Sub cmdAdd_Click() Dim iRow As Long Dim ws As Worksheet Set ws = Worksheets("DocumentFiled") 'Find First Empty Row in Database iRow = ws.Cells(Rows.Count, 1).End(x1Up).Offset(1, 0).Row