SEP Time & Date control error (1 Viewer)

balvinder

Registered User.
Local time
Today, 11:47
Joined
Jun 26, 2011
Messages
47
Hi,

I am using "SEP Date Control" & "SEP Time Control" to insert customer suitable date & time in my database (Telecalling_database). These entries are getting done by some tele-callers through Access VBA form.

Please help me to understand what is wrong in below code or is there something else need to be changed in control properties.
(CB stands for call back)
I'am getting below Error.

Run time error '2101'
The Setting you entered isn't valid for this property.


If (Me.Calling_code = "CB") Then

CurrentDb.Execute "UPDATE Telecalling_database set Follow_up_date = #" & Me.Follow_up_date & "#, Follow_up_time = #" & Me.Follow_up_time & "# WHERE Instrument_Number = " & Me.Form_S_No & ""

End If


Thanks in advance..!!!
 

balvinder

Registered User.
Local time
Today, 11:47
Joined
Jun 26, 2011
Messages
47
Can anyone please help me in understanding this...:confused:
 

spikepl

Eledittingent Beliped
Local time
Today, 08:17
Joined
Nov 3, 2010
Messages
6,142
Post more code, and indicate which line gives the error
 

balvinder

Registered User.
Local time
Today, 11:47
Joined
Jun 26, 2011
Messages
47
I have debugged the error & found that it is showing error on red parts.

If (Me.Calling_code = "CB") Then

CurrentDb.Execute "UPDATE Telecalling_database set Follow_up_date = #" & Me.Follow_up_date & "#, Follow_up_time = #" & Me.Follow_up_time & "# WHERE Instrument_Number = " & Me.Form_S_No & ""

End If


Error :- Run time error '2101'
The Setting you entered isn't valid for this property.
 

spikepl

Eledittingent Beliped
Local time
Today, 08:17
Joined
Nov 3, 2010
Messages
6,142
Dim strSQL as string
strSQL= "UPDATE Telecalling_database set Follow_up_date = #" & Me.Follow_up_date & "#, Follow_up_time = #" & Me.Follow_up_time & "# WHERE Instrument_Number = " & Me.Form_S_No & ""
debug.print strSQL

copy the output strSQL (from the Immediate Window) and post it here
 

balvinder

Registered User.
Local time
Today, 11:47
Joined
Jun 26, 2011
Messages
47
Thanks for reply...

I have already tried that method but it is not giving any result in immediate window. I have attached snapshot of debugging window for reference if this can help a bit...

Just wanted to check, Both control I'am using are ActiveX controls (SEP Date control & SEP time control). Are there any property to make them work? because with regular system date control this is not showing any error.

Thanks!!!
 

Attachments

  • Error.jpg
    Error.jpg
    94.7 KB · Views: 193

spikepl

Eledittingent Beliped
Local time
Today, 08:17
Joined
Nov 3, 2010
Messages
6,142
If there is no output in the Immediate WIndow then the code faile where indicated. The suspects then are

Me.Follow_up_date
and
Me.Follow_up_time

so do a separate debug.print on each of those prior to the offending statement now.

What are those things anyway? Controls in your form?
 

balvinder

Registered User.
Local time
Today, 11:47
Joined
Jun 26, 2011
Messages
47
No result again...

Yes, these are separate Date & time control available in ActiveX library. I'am using them to store desired date & time in database by selecting from VBA form.

Further post resolution of above matter, I'am looking to populate same record 10 minute prior to system date & time. For that I'll take your help as well..:)

I have attached Snapshot for both my VBA form & SEP control I've used.
 

Attachments

  • ActiveX control Snapshot.jpg
    ActiveX control Snapshot.jpg
    100.5 KB · Views: 315
Last edited:

Shenlung

Registered User.
Local time
Today, 02:17
Joined
Jun 30, 2011
Messages
19
The snapshots have bank account info on them, unless those are fake, i'd remove and blank out pronto!
 

spikepl

Eledittingent Beliped
Local time
Today, 08:17
Joined
Nov 3, 2010
Messages
6,142
WHat do you mean no result again? Where does you code crash? On the first one ?

You must remember that we don't see what you see, so you need to be very specific as to what you did and what the reaction was and where.

Did the first one crash? Then what is the syntax of referring to that control? That should come in some manual for your control.
 

spikepl

Eledittingent Beliped
Local time
Today, 08:17
Joined
Nov 3, 2010
Messages
6,142
Also, I don't quite get it: What EXACTLY is Me.Follow_up_date
and
Me.Follow_up_time?
Are these textboxes or what?
 

balvinder

Registered User.
Local time
Today, 11:47
Joined
Jun 26, 2011
Messages
47
@ Shenlung :- Appreciate your concern. But these details are fake & i know the consequences to publish correct details.

@ spikepl :-

Me.Follow_up_date (SEP Date Control on VBA form)
and Me.Follow_up_time (SEP Time Control on VBA form)

I have used both (SEP Date & SEP time control) on VBA form to capture Desired follow-up date & time for which snapshot attached in earlier post. I have used Debug.print command to get error as suggested.

Debug.Print code used :-

Code:
Private Sub Save_Click()

Dim strSQL As String
    
    If (Me.Calling_code.Value = "CB") Then
            strSQL = "UPDATE Telecalling_database set Follow_up_date = #" & Me.Follow_up_date & "#, Follow_up_time = #" & Me.Follow_up_time & "# WHERE Instrument_Number = " & Me.Form_S_No & ""
            Debug.Print strSQL
                        
            CurrentDb.Execute "UPDATE Telecalling_database set Follow_up_date = '" & Me.Follow_up_date & "', Follow_up_time = '" & Me.Follow_up_time & "' WHERE Instrument_Number = " & Me.Form_S_No & ""
    End If

End Sub

Further, I have tried to get output by using Debug.print separately as suggested by you for each (me.follow_up_date, me.follow_up_time) But there was no output in immediate window after pressing (ctrl_G).

Both SEP date & time control are ActiveX objects & i'am keep on getting the below error.

Code:
Run time error '2101'
The Setting you entered isn't valid for this property.

Everytime when i run the VBA form post selecting "CB" as calling code then it shows yellow background highlighted area in my code part for below line.

Code:
strSQL = "UPDATE Telecalling_database set Follow_up_date = #" & Me.Follow_up_date & "#, Follow_up_time = #" & Me.Follow_up_time & "# WHERE Instrument_Number = " & Me.Form_S_No & ""

If you need more information on any specific point, please let me know..

Thanks!!!
 

Users who are viewing this thread

Top Bottom