I should have come back to this sooner, sorry. I solved the issue by using IIF statements just so I could move on. I was hoping there was some sort of setting which says If anything is null set it to "". But that is approaching the "Read my mind and do it" button. We just aren't there yet...
OK. Here is my answer. I just thought there may be a way to make text boxes equal to "" instead of Null when empty. Apparently not. So when assigning values to a table or, in my case, a class I used clsOrder.Property=IIF(IsNull(MyFieldName),"",MyFiledName). It avoids the error nicely...
I am using Access 2007. I am taking field values from a form and putting them into the properties of a class object. Some values can be null, but I get the error "Invalid use of null..." because the property is expecting a value. How do I tell a property that null is ok?
For example I have this...
When the user clicks on "Cancel" the pop-up form is supposed to close itself. I am using
Private Sub cmdCancelSurvey_Click()
DoCmd.Close acForm, "frmNewSurvey"
End Sub
and I have also used the "Me" keyword for the form name. Yesterday this was working (or appeared to be working). No...
This is now working just as it is programmed. Nothing has changed. I have closed and re-opened the form with the calling function and that seems to have fixed the problem. Thanks for your help.
ScottInTexas
It's probably as hard as it looks.
Tried it without the acDialog. No change. I think the open is being canceled because of another error in the form. It has been a long time sincec I have had to write any code so a lot is VERY rusty. I want the user to type a name in a text box and when the window is closed then take the...
It is frmNewCounty. I just typed it here incorrectly. I checked my code and it is spelled correctly there.
ScottInTexas
It's probably as hard as it looks.
I'm trying to open a pop up form. I have tried
docmd.openform FormName:="frmCounty", WindowMode:=acDialog
and
DoCmd.OpenForm "frmNewCounty", , , , , acDialog
Either one generates the error; "The OpenForm action was canceled"
I just can't see what's wrong with this.
ScottInTexas
It's...
Thanks Fumei for your response.
Yes you are nearly right about the function of the document. When the new document is cloned the user must enter his/her tract # in the first field. This tract number will also appear in the footer and in the legal description on the first page. I don't want...
I set the objDoc at the opening of the new document because this is a tempate that, once started, there is some data that is not to be changed, namely the tract number. This tract nymber should be entered once by the user in the first text content control. Then it is to be placed in a content...
This may be too new for any answers but since I am trying to make this work I might as well ask one of the masters here. I have placed a ContentControl (Text) on my document. The Tag is txtTractID. I want to grab the text the user puts in that control and put it in the second text control...
OK, so I have an old version. What I need is a split function. Has anyone built one from scratch? I did a few years ago , but I am oout of practice and I am being pressured. I need to split a comma delimited string of items.
Thanks,
Scott
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.