Periodically (but not always), I get an error message suggesting that a Form which contains a ListBox is not "Open" when I attempt to access the ListBox. Can someone suggest a test that will ensure that Access is treating the Form as Open - and, if not, will open the form. I use the...
ChaZ,
Looks like I have my work cut out for me. Since this will likely take awhile, I just want to thank you for all your help.
I will get back to you with how well I was able to follow your suggestions and get the program to work.
Thanks again.
Jim
ChaZ,
Thanks much for your suggestion. Your code worked fine with respect to copying the values in the first column from "lstBox1" to "lstBox2". Can you help me with respect to copying the values for other columns. I tried the following in an attempt to copy the first two...
I have two list boxes (lstBox1 and lstBox2) on a form (frmForm1). lstBox1 has three columns of constants that with "RowSource" set equal to "Select * FROM tbl1". lstBox2 has four columns of constants with "RowSource" set equal to "Select * FROM tbl2". I am...
I need to "Calculate" several Excel Worksheets within Access VBA. I can Calculate individual worksheets as follows:
Dim WkBk as Excel.Workbook
WkBk.Sheets("Sheet1").Calculate
WkBk.Sheets("Sheet2").Calculate
But I cannot figure out how to calculate the entire...
Thanks to both Ben and Larry. But I am still having problems. I am currently using ADODB in Access 2002, which does not seem to recognize either QueryDefs or TableDefs. Is that because I am not using DAO?
Jim
I have the following line in a VBA program:
rs.Open "Select * from " & QryTable1
QryTable1 is a string variable that should equal the name of a Query of Table in my Database.
Obviously, I get an error whenever QryTable1 does not match a Query or Table in my Database.
My...
Thanks HTH Roy-Vidar,
I haven't tried "DCount". Can I use it with any Field to get the total number of records? Or, will there be a problem if there is an empty cell for the chosen Field?
Thanks much for your help.
Jim
I am trying to set a variable in VBA equal to the number of records in a Query. Do you have to open the Query and use a command like NumRecords = rs.RecordCount, or is there a shortcut that does not require that the Query be opened?
For example: Nz(DSum("Field1", Query(i))) seems to...
Thanks much for the detailed response.
cmd1 on Form1 has its own Private Sub cmd1_Click that is assigned to Form1.
Similarly cmd2 on Form2 has its own Private Sub cmd2_Click that is assigned to Form2. It looks to me that cmd1 and cmd2 are organized identically, yet cmd1 works and cmd2 does...
I have two forms (call them frm1 and frm2) in an Access Project. On frm1, I placed a command button (cmd1) with the "On Click" property set to "Event Procedure". When I left click cmd1, I go to the Event Procedure called "Private Sub cmd1_Click". When I left click...
Following code results in an error that says "Method 'Item' of object 'Forms' failed". Error occurs on the "Set lstBox..." line.
Dim lstBox As ListBox
DoCmd.OpenForm "frmMktSgmtSelect", acNormal
Set lstBox = Forms!frmMktSgmtSelect!lstMktSgmts
Can someone...
Yes, I did open the files in Notepad.
The "Problem 1" file looks quite manageable. It is about 20,000 records and only has three columns - but no field headings. This is the one where it looks to me like Access is trying to read all the records as a single record.
Following is a...
I get the Record Length error before even getting to the Import Text Wizard. That is, the error is the first thing I see after selecting the file for import.
Problems 1 and 2 were independent. Two different text files stored in two different locations. I attempted to import them into each of...
I am trying for the first time to import txt file data into Access by using the Access Menu: File/Get External Data/Import... I cannot get passed the two problems below for two different txt files:
Problem 1: txt file has three columns but Access seems to be reading all of the data as a single...
LittleSmudge and nicsin,
Thanks much to both of you. Yes, nicsin, I am working with a large table with 169,000 records. I thought Access was designed for large databases - I guess I was wrong. Is there another database program that either of you might suggest that is better at dealing with...
When I try to save a change in the data type for a Table, I get an error message saying that there is not enough disk space or memory. I have plenty of disk space and memory. Does anyone know what Access is really trying to tell me?
Thank you for any help.
Jim
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.