Run time error 3705 - Syntex error (Missing operator) in que

vinwin06
StarLounger
Posts: 82
Joined: 13 Nov 2013, 19:28

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by vinwin06 »

Hi Hans
I did as per the your suggestion but still I'm getting some fields can able to enter the date before previous ffield not filled up. Those fields are cb submission date technical and cb approval date commercial. I have saved one record for your reference on the attached database.
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by HansV »

I can't reproduce the problem. When I try to enter a record, I cannot fill in either cb submission date technical and cb approval date commercial.
In the sample database that you attached, both fields are locked.
Best wishes,
Hans

vinwin06
StarLounger
Posts: 82
Joined: 13 Nov 2013, 19:28

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by vinwin06 »

Did u tried using add new record option because for me also sometimes its works fine like design view to form view but I am not sure like the record its database which contains both the dates.

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by HansV »

Yes, I added a new record, and I couldn't enter cb submission date technical and cb approval date commercial.
Best wishes,
Hans

vinwin06
StarLounger
Posts: 82
Joined: 13 Nov 2013, 19:28

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by vinwin06 »

Hi Hans,

Sorry to bug you again i know your trying to help me here but still i am able to enter some data on the dates fields i have taken some snap shot and attached here for your reference. Its not like arguing with you i am trying to understand issue better,
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by HansV »

I do believe you, but I simply cannot reproduce the problem. I entered exactly the same data as in the screenshot in your Word document. I can enter a date in CB approval date - Technical, but both CB submission date - technical and CB approval date - Commercial remain locked.
Best wishes,
Hans

vinwin06
StarLounger
Posts: 82
Joined: 13 Nov 2013, 19:28

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by vinwin06 »

Hi Hans,

Did u enter data till tender number date and try to fill upother fields. Because iI have filled up until that field and try to enter other fields . just a final try else I will try to remove the field and try to add it again.

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by HansV »

Yes, I did.
Best wishes,
Hans

vinwin06
StarLounger
Posts: 82
Joined: 13 Nov 2013, 19:28

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by vinwin06 »

Hi Hans,

when i am directly opening the master form and enters its accepting the values then once i get into design mode of the form and come back return to the form view its not locked the field, so this time its not accepting the values. Then if i tried with from home form and click on add new record then its accepting the values for those three only without previous fields not filled up.

I am totally confused how its working well for you why its not working for me. Please help what should i do now....

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by HansV »

I don't have time to look at it now, I'll do that later today.
Best wishes,
Hans

vinwin06
StarLounger
Posts: 82
Joined: 13 Nov 2013, 19:28

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by vinwin06 »

Ok Hans. Thanks you so much for your help. For the understanding all the fields should accept values only when the previous field is filled up.

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by HansV »

The Locked property of the CBsubmissiondateTechnical and CBapprovaldateCommercial text boxes is set to No in Design View. So by default, these text boxes are unlocked.

You lock CBsubmissiondateTechnical in the following situations:

1) In Form_Current if CB_SubmissionID = 3 or 4 and if Technical_Evaluation_completed is null.
2) In Technical_Evaluation_completed_AfterUpdate if CB_SubmissionID = 3 or 4 and if Technical_Evaluation_completed is null.

So if CB_SubmissionID does NOT equal 3 or 4, CBsubmissiondateTechnical does not get locked. Nor does it get unlocked if it was already locked.

You lock CBapprovaldateCommercial in the following situation:

1) In Form_Current if CB_SubmissionID = 3 or 4 and if CBsubmissiondateCommercial is null.

Note that it isn't set in CBsubmissiondateCommercial_AfterUpdate.
So if CB_SubmissionID does NOT equal 3 or 4, CBsubmissiondateTechnical does not get locked. Nor does it get unlocked if it was already locked.
Best wishes,
Hans

vinwin06
StarLounger
Posts: 82
Joined: 13 Nov 2013, 19:28

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by vinwin06 »

Thanks Hans. But its pretty tricky to understand the logic can you please add it to my database it will be helpful for me or by default how i can lock it these fields?

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by HansV »

You'll have to add the code yourself, you'll learn much more from that than I I write it for you.
Best wishes,
Hans

vinwin06
StarLounger
Posts: 82
Joined: 13 Nov 2013, 19:28

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by vinwin06 »

Hi Hans,

Yes that's good i should have try on my own . I did but still i am getting that field can able to populate the values even when the previous field is blank. Please check the attached database.
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by HansV »

Try this version of the Form_Current event procedure. The structure has been simplified and indentation has been made consistent.

Code: Select all

Private Sub Form_Current()
    Dim f As Boolean

    If Me.NewRecord Then
        Me.CBsubmissiondateIssueTender.Visible = True
        Me.CBsubmissiondateTechnical.Visible = True
        Me.CBsubmissiondateCommercial.Visible = True
        Me.CBapprovaldateIssueTender.Visible = True
        Me.CBapprovaldateTechnical.Visible = True
        Me.CBapprovaldateCommercial.Visible = True
    Else
        f = Nz(Me.CB_SubmissionID, 0) = 3 Or Nz(Me.CB_SubmissionID, 0) = 4
        Me.CBsubmissiondateIssueTender.Visible = f
        Me.CBsubmissiondateTechnical.Visible = f
        Me.CBsubmissiondateCommercial.Visible = f
        Me.CBapprovaldateIssueTender.Visible = f
        Me.CBapprovaldateTechnical.Visible = f
        Me.CBapprovaldateCommercial.Visible = f
    End If

    If IsNull(Me.Tender_Number_date) Then
        Me.Tender_Issue_Date.Locked = True
        Me.CBsubmissiondateIssueTender.Locked = True
    Else
        Me.Tender_Issue_Date.Locked = False
        Me.CBsubmissiondateIssueTender.Locked = False
    End If

    If IsNull(Me.CBsubmissiondateIssueTender) Then
        Me.CBapprovaldateIssueTender.Locked = True
    Else
        Me.CBapprovaldateIssueTender.Locked = False
    End If

    If IsNull(Me.CBapprovaldateIssueTender) Then
        Me.Tender_Issue_Date.Locked = True
    Else
        Me.Tender_Issue_Date.Locked = False
    End If

    If IsNull(Me.Tender_Issue_Date) Then
        Me.Bid_Due_date.Locked = True
    Else
        Me.Bid_Due_date.Locked = False
    End If

    If IsNull(Me.Bid_Due_date) Then
        Me.Technical_Evaluation_started.Locked = True
    Else
        Me.Technical_Evaluation_started.Locked = False
    End If

    If IsNull(Me.Technical_Evaluation_started) Then
        Me.Technical_Evaluation_completed.Locked = True
    Else
        Me.Technical_Evaluation_completed.Locked = False
    End If

    If IsNull(Me.Technical_Evaluation_completed) Then
        Me.CBsubmissiondateTechnical.Locked = True
        Me.Commercial_Evaluation_started.Locked = True
        Me.Commercial_Evaluation_completed.Locked = True
    Else
        Me.CBsubmissiondateTechnical.Locked = False
        Me.Commercial_Evaluation_started.Locked = False
        Me.Commercial_Evaluation_completed.Locked = False
    End If

    If IsNull(Me.CBsubmissiondateTechnical) Then
        Me.CBapprovaldateTechnical.Locked = True
    Else
        Me.CBapprovaldateTechnical.Locked = False
    End If

    If IsNull(Me.CBapprovaldateTechnical) Then
        Me.Commercial_Evaluation_started.Locked = True
    Else
        Me.Commercial_Evaluation_started.Locked = False
    End If

    If IsNull(Me.Commercial_Evaluation_started) Then
        Me.Commercial_Evaluation_completed.Locked = True
    Else
        Me.Commercial_Evaluation_completed.Locked = False
    End If

    If IsNull(Me.Commercial_Evaluation_completed) Then
        Me.CBsubmissiondateCommercial.Locked = True
        Me.POsentSaleAgreementfaxofintentsent.Locked = True
      '  Me.Tender_cancelled.Locked = True
    Else
        Me.CBsubmissiondateCommercial.Locked = False
        Me.POsentSaleAgreementfaxofintentsent.Locked = False
       ' Me.Tender_cancelled.Locked = False
    End If

    If IsNull(Me.CBsubmissiondateCommercial) Then
        Me.CBapprovaldateCommercial.Locked = True
    Else
        Me.CBapprovaldateCommercial.Locked = False
    End If

    If IsNull(Me.CBapprovaldateCommercial) Then
        Me.POsentSaleAgreementfaxofintentsent.Locked = True
        Me.Tender_cancelled.Locked = True
    Else
        Me.POsentSaleAgreementfaxofintentsent.Locked = False
        Me.Tender_cancelled.Locked = False
    End If
End Sub
Best wishes,
Hans

vinwin06
StarLounger
Posts: 82
Joined: 13 Nov 2013, 19:28

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by vinwin06 »

Hi Hans,

Once again you have proved your genius, its works great thank you so much for your help.

avan
3StarLounger
Posts: 223
Joined: 08 Oct 2017, 09:50

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by avan »

Hi Hans,

This is a great work. Can you add <ALL> in the combo box for selection?
Because i have problem to add it.
Appreciate for your help.

Thanks.

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by HansV »

Welcome to Eileen's Lounge!

I will look into your problem and post back when I have a solution.
Best wishes,
Hans

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Run time error 3705 - Syntex error (Missing operator) in

Post by HansV »

Can you tell me what the Row Source of your combo box is now?

And how do you use the combo box?
Best wishes,
Hans