Hey Pampers,
Thanks for your reply. I am pasting the function and code that I am using to accomplish what I'm doing. Remember my goal is to prevent from having to enter Response = NIL(NewData) in each and every NotInList event of each and every cboBox.
Here's my code:
Function NIL(NewData As...
I am using a function for the NotInList event on multiple cboBoxes. I can call the function from the forms module using: Response = NIL(NewData), however I would rather not put this call behind every cboBox and into the forms module. Is there a way to put this call into the property of the...
One way to to open the form like this:
DoCmd.OpenForm frmname, , , , acFormAdd
Another way is to go to the Forms properties and under the 2nd tab (Data) change Data Entry to "Yes" Doing this will always open the form to a new record and may not be what you want to do.
HTH,
Shane
With that being said, then couldn't you do some kind of a recordcount using the individual as a criteria and if it comes up <=0 then have something else happen and not let your code even get started?
Tom,
Your welcome. Wish I could of been more help to ya. I thought about DCount but couldn't get my mind to wrap around the right way to get it done. When I saw Paul's post I was glad he stepped in cause I said to myself "yea, what he said."
Shane
Ok, Tom, I don't want to give up yet and since you don't seem to have any other takers then lets see if we can't build a snare. After the DLookup for eventTemp put MsgBox eventTemp and then run this on something that you know will come out wrong and let's see what it tells us the value is of...
Hey Tom,
I'll take a shot at something here and hope I'm not chasing a rabbit but try changing eventTemp to this:
eventTemp = DLookup("EventID", "tblDates", "[EventID] = " Forms!frmAppointments!cboEvent & " And [EventID] > 3")
I don't know for sure if that will make a difference but it's...
Hey Oz,
Is runtime error 2427 "has no value" error? It would help out if we knew what the errors says but I'll take a shot in the dark. Maybe you should nest your code inside of another If statement that checks for Me!OverallTotal being either empty or Null and stop the code or have it do the...
My problem is resolved by making a little bit of a change. Below is how it was resolved.
I had put the code in the frmNavigators OnClose event, which wasn't firing when the dbase was closing cause on the frmNavigator I have a cmdButton that closes the dbase with DoCmd.Quit. The frmNavigator...
I found the code below to turn off the toolbars and menu's, which works fine, however even if I set it back to true at the Close event of the main form, I can not see the toolbars and menu's on any of my other databases (separate dbases from the one that this code is in). I can set it back to...
If StationID is numberic try:
WHERE Werknemers.StationID)=" & [forms]![Statistiek per station]![StationID]
If StationID is text try this:
WHERE Werknemers.StationID)='" & [forms]![Statistiek per station]![StationID] & "'"
HTH,
Shane
...Function fCust() As Form
Set fCust = Forms![frmCustomers]![subCusDet].Form
End Function
Function fSQL() As String
fSQL = "SELECT * FROM [Progress Notes] WHERE [Progress Notes].CustomersID =" _
& Forms![frmCustomers]![CustomersID] & " AND [Progress...
Hey Zion7,
Thank you very much for the education. I'm off to give it a try. I get back with ya if I screw things up. :) (which I'm quite capable of, unfortuately)
Shane
Hey Pampers,
Thanks for your reply. I do the same thing you have recommended, on several other forms with no subform, but this is acting different from that. I have some investigating to do on the subforms properties. I have learned that a few events in the wrong place can cause a problem...
Hey Zion7,
Thanks for your help. I believe you are getting me well started on this project. If I took your example above, then could I go a step further and call it something like this: frm.RecordSource = fSQL
Thanks again,
Shane
I'm just starting to built my own functions and subs and would like to ask a
couple of questions, so that I can gain a little more knowledge on how to do
this.
Question #1
If I have a particular Form with a Subform on it and was going to be
referring to it often in my code. How could I make...
A2K
I am using the code below to filter a subform[subCusDet] on MainForm
[frmCustomers], (using a pop up form). If records are found I allow the
subform to be filtered and this part works fine. If no records are found I am
trying to set the FilterOn back to false. At this point I'm getting an...
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.