Here at work, we have proved that the CMOS battery could be dead and still have the correct time in Windows. How? Most networks have a timeserver that sets the time for computers if they get out of sync, so the CMOS battery could still have a role in this. Next, VB allows dates to be set as...
I would keep the same table intact and do the delete script either right before you execute an append query (formerly your make table query) or when you are finished with the data. This will ensure that the table is clean when you put in the data. You can then do a record count and see if it...
I have no global variables and here is the code from the form. When in debug, I pointed to the line that I indicated with a --> and DATE was displaying NULL not the system date.
Option Compare Database
Option Explicit
Dim strfilter As String
Private Sub cmdButtonApplyFilter_Click()...
Are you constantly creating the same tables? If so, you may just want to delete all the records from the table. Access has a bloating issue when you create new objects and then delete them. To do this, simply use the following:
CurrentDb.Execute "Delete * from tblxxxx"
Let me know if this...
I just encountered a problem where the built in date function in VBA shows that DATE is NULL when in debug mode. The NOW function still works however. Does anyone have an idea what might be causing this? I've never had this problem with the DATE function before. My thought is that it might...
The array dimension and/or size may change due to the data being displayed. I would like to be able to dynamically change the number and/or size of the fields.
You could try the following code on the ThisWorkbook module in Excel:
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If Sh.Name <> "Sheet1" Then
If Not ValidSheetUser(Sh.Name) Then
MsgBox "You are not authorized to view this sheet", vbOKOnly + vbCritical, "Unauthorized...
I need to dynamically convert parts of a spreadsheet to columns. I used a macro to get the following syntax:
Selection.TextToColumns Destination:=Range("A7"), DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(11, 1), Array(24, 1), Array(37, 1), Array(50, 1), _...
I prefer to write my queries in code, but I am not sure how to reference them from another query. I know FoxPro supports cursors, but Is this possible in Access?
Here is one option that you could use. On form1 do the following:
Private Sub Form_Load()
Form2.Show 'Opens Form 2
End Sub
Private Sub Form_LostFocus()
If Not blnFormMove Then
Form1.SetFocus 'Keep focus on current form
If MsgBox("Do you want to go to the other form?", vbYesNo, "Go...
The tables are listed. But when you attempt to click on any of them, all tables vanish. The tables do not reappear by changing from one DB object back to another.
I have an application that pulls data (1 table) from an SQL server. The problem is that occasionally the tables disappear. I mean both the linked table and all local tables disappear. Closing and re-opening the database corrects the problem, but I need this program to stay up and running...
I have 3 control arrays (text box, list box, and combo box)and would like to populate a form in 3 columns. I have never tried to use a control variable before and I am have a problem trying to get it to work. My code is below, if you have any suggestions, please let me know.
Private Sub...
You need to place a form text control on your document. Note: You cannot place a form text control in the header or footer, so you would have to place it on each page where you want it to print. You could then, place this code in the close event of your document or you could call it from the...
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.