Hi. There are a couple of methods for executing your query without calling the confirm dialog. Turning off ‘Confirm Action Queries’ works in most cases. However, some action queries will give you a dialog regardless of that setting.
The method I prefer is CurrentDb.Execute("SQL String"). Just...
Hi Aziz. A long integer can hold numbers ranging from + or - 2,147,483,647. So, I'm guessing there is something else causing the overflow. If you don't mind, could you post the offending code?
~Abby
Hello Peter. Here's some code that should do the trick. Set the third fields 'Tab Stop' property back to 'Yes' and use this in it's 'OnEnter' property.
If Me.secondfield > 15 Then
DoCmd.GoToRecord acDataForm, "Form Name", acNewRec
Me.Firstfield.SetFocus
End If
That should do the trick...
The BeforeUpdate event doesn’t take place by entering a new record. Though exiting the old record could trigger it. Additionally, it could be that something in you code is triggering the event. Without seeing your form, it's difficult to know how best to handle that. But, if you can find a...
I've had occasionally had problems with fields, that I believe to be null, not returning true using 'is null'. Particularly if they formally had a value that has been deleted. If this should prove to be the case for you, here's an example of what I do.
IF IsNull([field])=True or [Field]="" Then...
Hello. Here are a couple of short articles that may help you out. You can use the method from the first article to add a blank line to your combo box. The second article will explain how to use the NotOnList event to automatically add a new entry into your combo. I hope they help.
Adding "All"...
Thank you for the information. The database runs on a single processor under Win98. If it helps any I don't really care if they run simultaneously or just appear to. What I'm looking for is to have my form continue update every half a second while the database runs some action queries (3 append...
I don't know whether or not what I want to do is feasible. But, I have a module that runs some action queries using the CurrentDb.Execute method. While that module is running I also have a form with a sub in its On Timer event that updates some controls on the form. The problem is when the...
Ok, I figured it out. It's the control's 'Selected' property that I need to set, not the 'ItemsSelected' property. Sorry if I wasted anyone’s time.
~Abby
Thank you for the prompt reply. However, that much I had already figured out. My question how do I tell it to deselect the other rows. I've tried a number of different things, but I can't seem to change the controls 'ItemsSelected' property.
Would you give me an example of how it's done?
~Abby...
Hello everyone. I have a form that uses a multiselect list box to set its filter. This much works fine. What I'd like to do now is code the list box to deselect all other items if one certain item is selected. Here is a sample list to help illustrate what I'm trying to do.
All
Green
Blue
Red...
Hello. The following line of code will do what you're looking for. However, you should be aware that this will only work if the code exists on all forms used to create records and records are not created directly in the source table. That said, use the following line of code in the forms 'Before...
That should do it. I'm reminded of something my father used to say, "If it's a stupid trick and it works, then it's not a stupid trick." Thanks Richie! =)
~Abby
Hi all. I’m having a problem with questionnaire I’m building. Technically I think this is a problem with a form. But I’m posting it here because I’ve got a feeling the solution will lie in code. The questionnaire is built as a form containing a question with a continuous subform listing a number...
Perhaps you could modify your SQL statement to include the string variable as one if it's fields. For example:
"SELECT Table.Field1, Table.Field2, '" & strYourVariable & "' AS fldCriteria FROM Table WHERE Field1 = Something"
You can then create a control on the report to show that field. In...
You're encountering a problem because an SQL statement produces a recordset, not text, even if that recordset only contains one record with one field. Something like this should do the trick.
Dim rstA as recordset
Set rstA = CurrentDb.OpenRecordset(SELECT managers.mlastname AS mlastname FROM...
Happy holidays to you too!
Here's the quick answer. Drop the word 'Forms!' from the beginning of your statement. Your dim statement has already defined 'Frm' as a form, so it's unnecessary. The code below should do the trick.
Frm![ChkCHF] = True
~Abby
I have an old DOS based database that I’ve been manipulating with some Access scripts. Basically I take information from my Access DB and use sendkeys functions to copy the information into the old DB. (Not pretty, I know. But, the old DB only accepts keystroke input.) Everything worked fine...