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...
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...
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...
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'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...
Is it possible to evaluate a string as the concatenation of a string and variable?
I'd like to store a string such as:
"A new file (" & stParam & ") has been created."
into field "Message" of a table, then retrieve that field value and evaluate the string with the established value of...
If the value of a combo box is 0, I want to cancel the OnExit event except if the user clicks on a button that closes the form. Can this be done? Is there any way to reference the control that will receive focus from within the Exit event of a control?
-------------------
Rob Foye
Database...
Is the Export Wizard not starting when you try to export a table to a Text file?
Try creating a query based on the table and export the query.
I had searched everywhere for help on this, and the only suggestion I could find for getting the Export to work was to get out of Sandbox mode. Well...
Is there any way to refer to the properties (eg .Name) of a control inside the code for an event of that control?
For example, in the OnClick event of a label:
Private Sub lblDept_Click()
Dim stName As String
stName = <label>.Name
Debug.Print stName
End Sub
Where <label> is...
I'm probably missing something really simple here. I want to create a new Query and open that in Design mode with a source table/query already chosen, but no fields yet added to the query. The wizards do something similar to this, but I can't figure it out how to create the query without...
Is it possible to use an array variable in a function that will return an array to the calling procedure?
My code pulls a list of recipients for a certain type of email to be sent (in this case, "Rush"), and creates the arrays for the 3 email address fields (To:, CC:, BCC:)
What I'd like to do...
I have a module that is creating it's own breakpoint, and I can't figure out how to stop it.
The user fills in search fields on a form and clicks a button to launch the search procedure. The first part of the procedure sets variables and builds SQL strings for the search, and the code is...
I have the code that validates my field (see below), but I also want to delete the date that was entered so that the user has a blank field to start entering a complete date (instead of editing the previous incorrect date). Trying to set the value (e.g. txtDate=Null) is not allowed because the...
I've seen plenty of questions and answers about how to save down the selections from a multi-select listbox, but I now need to go the other way: I need to select items in the list box based on the values in an array.
I assume I need to loop through the rows of the list box, but is there a...
Is there any way to keep the XP System Theme from changing the colors I have chosen for my Access 2003 forms?
I've searched "theme colors" and all I seem to find are ways to allow the system theme to show, but nothing to keep the system theme from interfering.
I have one of those "dangerous"...
I have a numeric field that I want to clear if a research "flag" field is True. I put the following code in the BeforeUpdate event, but it is not halting the update. What have I left out?
Private Sub txtNewPayment_BeforeUpdate(Cancel As Integer)
If optResearch = True And ((Not...
I have developed several multi-user databases, and keep reading about how you should always split multi-user apps into a front end and back end. I have a couple questions.
1. Does splitting make record locking and simultaneous updates of the same record MORE or LESS of a problem?
2. Does the...
I have a form that is based on a fairly complex SQL string that includes a WHERE clause. I have another form where the user enters search terms in 5 possible fields that sets further WHERE conditions for a filter of the first form. The filtering works fine if there are matching records. However...
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.