Thank you very much, bdmangum. Everything works like a charm now. I really appreciate how you document the code so I know what is going on. I didn't realize the Cancel = True at the end was to prevent the normal SaveAs dialog from popping up. I have given your responses a star.
bdmangum,
Thank you for the reply. Your post showed me where I was going wrong (i.e. I forgot to name the class module to the same name as the line: dim x as new class module). And I didn't realize Word considers VBA a macro, so my default High security settings weren't allowing me to run the...
I have been searching the internet, but can't seem to put the pieces together. I have a document that when I click File->Save As, I would like to prefill the Filename textbox on the Save As Dialog with a hardcoded file name (I am guessing using VBA). But I would like it to work only on Save...
I might be going about this wrong, but this is my idea:
I have a XML document in the format of:
<lenders>
<lender>
<name>Bank of America</name>
<address>1234 Main Street</address>
<benefits>
<benefit>0.25% interest rate reduction</benefit>
</benefits>
</lender>...
Sounds fun. The first solution I came up with is using a recordset (to read the .txt file into VB) and a multi-diminsion array (to act as the matrix). If you always know the size of the matrix, you can hardcode both dimensions, if not, make it a run-time multi-dimension array. If you want to...
I know this works in VB, not sure about VBA. Right after the rst.filter statement, check to see if the recordset is empty. Example:
If Not(rst.BOF And rst.EOF) Then
...
Else
...
End If
The first part of the If statement will execute if the recordset is NOT empty. The Else will execute...
I am looking for some ideas on how best to go about doing this. Right now I am using MS Access to do a linked table to the text file with fixed width. The problem with linked tables, they seem to open up with exclusive rights, therefore, only one person can have it open at a time. Does VB6...
gmmastros,
Thank you for the idea. It ran through my code, but didn't seem to work. There are definitely some noticable differences between Access and AS/400 that might not make it possible to do that method, but I appreciate the help all the same.
I am trying to move data from the AS/400 to an Access Database. Currently I am doing the following:
If Not (AS400_FMNOTE.BOF And AS400_FMNOTE.EOF) Then
AS400_FMNOTE.MoveFirst
Do While Not (AS400_FMNOTE.EOF)
PC_FMNOTE.AddNew
PC_FMNOTE("NEST#") =...
DrJavaJoe,
You have pointed me towards an option I haven't tried before and from everything I read, looks like a better option then anything I tried. A couple clarifications and I will be on my way. First, Does Access/VB support nested Transactions? I can see myself needing one when I first...
I guess I don't know the difference between CursorType and LockType, I did a little more testing and it seems like adOpenStatic, adLockBatchOptimistic seems to do what I wanted.
Take a check register for instance, you add 3 entries, you can see those 3 entries, they are in the memory of the ADO control, so then you can click Save or Cancel. Save will append all 3 entries to the database, Cancel will append none. Does an ADO control have "storage memory" that isn't the...
Basically I want to add however many records (rows), but at the end, have the decision at the end to update or cancel. If I do .AddNew, .Update, .AddNew, .Update, ... , I don't have the option to cancel all the .AddNew at the end.
My problem:
rst.open "Select * From Table, conn, adOpenOptimistic, adLockOptimistic
If I do:
rst.AddNew
rst("Field1") = Whatever
rst.AddNew
rst("Field1") = Whatever
The first AddNew gets added to the database (Access 2000), but the second is subject to rst.CancelUpdate and rst.Update.
I...
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.