Form not loading after search

Thank you. I was able to accomplish everything. I appreciate all your help.
 
Anytime. Glad we could help.
 
RG,
I added a checkbox to my search form. I utilized the Triple State settings in the Property, and on my table I made sure I used Yes/No as my data type.
I also used an If statement:
If tcBox = True Then
tcxBox.enabled = False
Else
tcxBox.enabled = True
End If
I also used DoCmd.SetWarnings False.

When I open my form from the search lookup. I get this message: Can't set Value to NULL when CheckBox property = False.

Any Ideas in how I can fix this?

Thanks in advance!!
 
You sort of lost me with the CheckBox. Why are you using TriState instead of just True/False? What is wrong with Me.tcxBox.enabled = Not Me.tcBox?
I recommend *not* using DoCmd.SetWarnings False What message are you trying to avoid? I use CurrentDB.Execute YourQuery, dbFailOnError for action queries and avoid any warning messages but still get the errors (which I want)
 
I have a checkbox in a form, that if it is checked then checkbox2 becomes enabled. If checkbox1 is not checked, then checkbox2 is not enabled. I am trying to avoid this error msg: Can't set Value to NULL when CheckBox property = False. In my data type I utilized Yes/No, and the format is True/False in the table.
 
Okay, after I spent some time trying to pin point this error. It is not in VBA, or the Checkboxes. It has something to do with an active control I am using. I used a Microsoft Date time picker. When I try to attach a record source to this this ActiveX component, I recieve that msg.... Sry for the confusion.
 
Let's go back to square one. What version of Access are you using and on what OS? You are trying to attach a RecordSource to the DatePicker ActiveX control? Really? To what end?
 
I am using Access 2000, on Windows XP SP4. Microsoft Date and Time Picker Control 6.0 (SP4). I used the ActiveX properties and turned the checkbox on. Below is the Private Sub I am trying to modify. I realized that I had to keep the checkbox option checked to get rid of the msg. I would like to use VBA to keep it always active and have the check box inside the active control checked and not visible.

Private Sub DatePicker_CallbackKeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer, ByVal CallbackField As String, CallbackDate As Date)
End Sub

Thanks in advance.
 
For the record, AFAIK WinXP is only up to SP3, not SP4; but maybe with a different language...
Why are you trying to put code in the ActiveX. Why not just deal with the control that the ActiveX is loading?
 
Its a User Usability issue. I don't want them to be able to check or uncheck the box inside this ActiveX component.
 
I don't want to sound silly here, but this idea of yours never crossed my mind. Do you have any URLs available? Thanks!
 
I've used several of them and they work really well. Have fun.
 
Yesturday I had some questions about If statements, I am using alot of them, is there another way to combine these if statements????
 
Yesturday I had some questions about If statements, I am using alot of them, is there another way to combine these if statements????
You really need to start a new thread with this new subject. If this thread is solved to your satisfaction then go ahead and mark it as Solved.
 
Oops...my bad. No Solved tool on this Forum. <slapping head loudly>
 
Your correct. Even though its the same form issue, I have posted a new tread under Modules & VBA.
RG thanks for all you assistance. I appreciate your patience with me, I have much to learn about access.

Thanks!
 

Users who are viewing this thread

Back
Top Bottom