I need help with the following code. I need it to be able to handle the After_Update event when the text box is a Null, or if there is no match I would like to just cancel the whole process.
Such as:
If rs.NoMatch Then
MsgBox "No Match"
"Cancel entire...
Okay...I am still stuck a little. I use the following code, and it works as far as letting the user know there was no match. However, it still goes to the first record. How can I get it to do nothing? Do I need to do something in the Before_Update event?
Dim rs As Object
Set rs =...
I use the following code in a text box to jump to a certain record. The way it is now, if there is no record that matches, then it jumps to the first record in the table.
How can I trap or identify when this code returns no match?
I know it would be easy if it were a combo box (NotInList), but...
Can somebody help me with the following string. It's a date field and I have never done this with a date field. Not sure how to use the # and etc...
I currently have it set for a text field, but that is just not working.
Thank you:
rs.FindFirst "[ActivityDate] = '" & Me![txtActivityDate] & "'"
I use the following code to jump to an account by entering an account number. I just need to put a little MsgBox error in there saying there is no such account number when a bad account number is entered. It originally was a Combo Box and the error simply went in the NotInList Event, however, it...
Okay, I have done the following. I basically copied Allen Browns code and replaced it with different names. I need help with the "row sources".
Here's the code:
Option Compare Database
Option Explicit
Dim OrderNumberStub As String
Const conOrderNumberMin = 3
Function...
I have a combo box on a form that gathers data from a query, however, there are several hundred thousand or so records in there. I would really like to speed this process up by somehow doing the following.
Maybe after a few characters are entered in the combo box, then it can populate with a...
Here's what I tried:
Private Sub cbo_ActivityCodeSearch_AfterUpdate()
Dim rs As Object
Set rs = Forms![AddEditActivityCodesSub].Form.Recordset.Clone
rs.FindFirst "[ActivityCode] = '" & Me![cbo_ActivityCodeSearch] & "'"
If Not rs.EOF Then...
Ok, I am finally having a chance to tinker with this a bit.
AceMan, the subform is NOT LINKED. The main form is a single form of Items from a table that can be edited. On that form I have a combo box to jump to the record on the main form as follows:
Private Sub Combo15_AfterUpdate()
Dim...
I have a Form that is single form, and the subform is datasheet.
I would like to have a combo box on the main form that when you enter a text value in it, it will jump to that same record in the subform. I don't want to filter just that record, I would only like the subform to jump to that...
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.