I figured out a workaround. For the bound instance, I can leave the code in the BeforeUpdate event. For the Unbound instance, I set focus on another field, set the value of the first field to null, then return the focus to that field.
-------------------
Rob Foye
Database Management
Regions Bank
By the way, form is unbound for new records and bound for looking at existing records. It looks like on existing records, it reverts to the previous saved version, but the Unbound New records are not reverting to Null.
-------------------
Rob Foye
Database Management
Regions Bank
Ok, I've searched and can't find an answer to my problem. I am doing a validation by using the BeforeUpdate event. If the value meets certain conditions, I want to Cancel the update and clear the field.
Sub FieldName_BeforeUpdate(Cancel As Integer)
***some code***
If vVal = vbCancel Then...
I've noticed that in some of my (Access2003) databases, the Intellisense starts acting really strange. For instance, after typing a period and then the first letter of the method, the intellisense will start to show the list of methods, then after 2 seconds, disappear and NOT complete the...
Thanks, MajP. I think your suggestion will start me on the path to find a solution, if there is one.
Unfortunately, I'm under a time constraint and can't play around with this idea anymore. Instead, I'm having to continue using 2 virtually identical forms. But when I work on "version 2", I'll...
I have code that creates identical instances of a form by adding to the collection for the form.
I would like to create multiple instances, HOWEVER, each instance would need to parse an OpenArgs value to set a recordset for the instance. Is this possible?
In other words (I think), is it...
Thanks, Remou. I had just found the OutputTo action when your reply came in. It did what I needed it to do.
-------------------
Rob Foye
Database Management
Regions Bank
I've just been looking at the TransferSpreadsheet action, and what I've read says that you can not use a SQL string. You must first use the SQL to create a query object, then use that query object in your Transfer action.
-------------------
Rob Foye
Database Management
Regions Bank
No, I don't want to transfer the underlying data set. I know how to do that. I need to be able to do the equivalent of the "Analyze it with MS Excel" menu selection.
I can select a report, go the the menu and select "Analyze it" and an excel file will be created that retains the column...
GingerR: Your suggestion of putting the "filter" in the GotFocus event worked perfectly! Before making the initial post, I had tried that in the MouseDown event, and it didn't work. I keep forgetting "If at first it doesn't succeed, try a different event."
Even better is that even if I tab into...
Both of you misunderstood my question. I don't want incative users to appear in the list at all (when selecting).
-------------------
Rob Foye
Database Management
Regions Bank
I'm hoping I can do this with just the combo box instead of a combo box and an overlapping text box.
I have a combo box that displays a Processor's name, but the value stored is the UserID (hidden column 1 of the combo box).
If a processor is no longer with the company, I want the box to...
I don't know about you, but I get slowed down with timer calls where you have to specify the number of ticks or milliseconds. Here is a bit of code I wrote where you enter the Time Unit (Minutes, Seconds) and the number of those units that you want to wait.
Public Function fMillis(lngVal As...
I don't know about you, but I get slowed down with timer calls where you have to specify the number of ticks or milliseconds. Here is a bit of code I wrote where you enter the Time Unit (Minutes, Seconds) and the number of those units that you want to wait.
Public Function fMillis(lngVal As...
I'm formatting an Excel worksheet from Access using VBA. Part of my code is:
Set appExcel = New Excel.Application
Set WB = appExcel.Workbooks.Open(stFile)
Set WS = WB.Sheets(1)
WS.Range("E:E").Select
Selection.HorizontalAlignment = xlLeft
Selection.VerticalAlignment...
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.