Sabtu, 25 Januari 2020

Re: [MSAccessProfessionals] decimals not to show on drop down list

Regarding the previous thread, "Duplication of entry..." you had stated "Sorry for botheration, the code is now as:". Then I had asked if your question was resolved which you didn't reply to. Perhaps you meant to suggest it was resolved and I just didn't understand and needed confirmation which I didn't get. Maybe it's a language or culture difference.

No matter what I tried, I can't get the combo box to display decimal places even if I attempt to format the column in the design of the Row Source. You could try concatenate a zero length string to the TripNo column making it TripNo & "".

Khahlid said:
For my current question nothing is set in combo box display, Format--> Blank, decimal places=0,visible=Yes, Column Count=3
Row source of combo box is:
Under date tab tabm Row source is:
SELECT CST.TripNo, CST.CstName, CST.SegmentNo FROM CST ORDER BY CST.TripNo;
Bound Column=1, Limit to list = Yes
I'm available full time, waiting for any suggestion and pointing out my mistake.
Regards & thanks,
Khalid
_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#115415) | Reply To Group | Reply To Sender | Mute This Topic | New Topic

Your Subscription | Contact Group Owner | Unsubscribe [sugeng.panjalu.access@blogger.com]

_._,_._,_

Jumat, 24 Januari 2020

Re: [MSAccessProfessionals] decimals not to show on drop down list

Hi Duane,
Since posting my question I've been looking for any reply, this is the first reply from you i can see. For my previous thread i immediately replied and answered that i have solved and managed it and said thanks.

For my current question nothing is set in combo box display, Format--> Blank, decimal places=0,visible=Yes, Column Count=3
Row source of combo box is:
Under date tab tabm Row source is:
SELECT CST.TripNo, CST.CstName, CST.SegmentNo FROM CST ORDER BY CST.TripNo;
Bound Column=1, Limit to list = Yes
I'm available full time, waiting for any suggestion and pointing out my mistake.
Regards & thanks,
Khalid
Note whenever you need any clarification from me i will respond immediately
_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#115414) | Reply To Group | Reply To Sender | Mute This Topic | New Topic

Your Subscription | Contact Group Owner | Unsubscribe [sugeng.panjalu.access@blogger.com]

_._,_._,_

Re: [MSAccessProfessionals] decimals not to show on drop down list

Hi Khalid,
You never responded to my previous question to you:
==============================================
"Is there still an issue? Your reply just provides code with out any status regarding your question. Also, you haven't included any part of the previous thread in your reply. It always helps to include previous messages.

If it doesn't work, I would add this line

  stLinkCriteria = "[TripNo]=" & SID
  debug.Print stLinkCriteria      'open the debug window to view this
==============================================

I would like to get an answer and then address this question.

Also what have you tried in order to set the format in the combo box display?
What is the Row Source of the combo box?

Regards,
Duane

From: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io> on behalf of Khalid Tanweer via Groups.Io <khalidtanweerburrah=yahoo.com@groups.io>
Sent: Friday, January 24, 2020 1:54 AM
To: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io>
Subject: [MSAccessProfessionals] decimals not to show on drop down list
 
Hi all,
Tbl CST has PK TripNo, Long Integer,Standard. decimal places zero.
on a form  'Cst Expenditures' is a combo box CstName unbound, when i click it on drop down list of CstName it shows
CstName (Labelled Trip No) with two decimal places,
after selecting any from the list combobox CstName the value is shown rounded, how do i stop decimal places in list.
 
Please help.
Regards Khalid

Kamis, 23 Januari 2020

[MSAccessProfessionals] decimals not to show on drop down list

Hi all,
Tbl CST has PK TripNo, Long Integer,Standard. decimal places zero.
on a form  'Cst Expenditures' is a combo box CstName unbound, when i click it on drop down list of CstName it shows
CstName (Labelled Trip No) with two decimal places,
after selecting any from the list combobox CstName the value is shown rounded, how do i stop decimal places in list.
 
Please help.
Regards Khalid
_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#115412) | Reply To Group | Reply To Sender | Mute This Topic | New Topic

Your Subscription | Contact Group Owner | Unsubscribe [sugeng.panjalu.access@blogger.com]

_._,_._,_

Senin, 20 Januari 2020

Re: [MSAccessProfessionals] Duplication of entry is not checked

Khalid,
Is there still an issue? Your reply just provides code with out any status regarding your question. Also, you haven't included any part of the previous thread in your reply. It always helps to include previous messages.

If it doesn't work, I would add this line

  stLinkCriteria = "[TripNo]=" & SID
  debug.Print stLinkCriteria      'open the debug window to view this

Regards,
Duane
 



From: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io> on behalf of Khalid Tanweer via Groups.Io <khalidtanweerburrah=yahoo.com@groups.io>
Sent: Monday, January 20, 2020 6:01 AM
To: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io>
Subject: Re: [MSAccessProfessionals] Duplication of entry is not checked
 
Hi all,
Sorry for botheration, the code is now as:

Private Sub TripNo_BeforeUpdate(Cancel As Integer)
 Dim SID As Long
    Dim stLinkCriteria As String
    Dim rsc As DAO.Recordset
 
    Set rsc = Me.RecordsetClone
 
    SID = Me.TripNo.Value
       
    stLinkCriteria = "[TripNo]=" & SID
 
    'Check Add New Cst table for duplicate TripNo
    If DCount(TripNo, "CST", _
              stLinkCriteria) > 0 Then
        'Undo duplicate entry
        Me.Undo
        'Message box warning of duplication
        MsgBox "TripNo: '" & SID & "' has already been allotted." & vbCrLf & _
              "You will now been taken to the record of TripNo. '" _
              & SID & "'.", vbExclamation _
        , "PTF Guide - Duplicate Entry"
        'Go to record of original TripNo
        rsc.FindFirst stLinkCriteria
        Me.Bookmark = rsc.Bookmark
    End If
    Set rsc = Nothing
End Sub

Thanks for replies,
Khalid

Re: [MSAccessProfessionals] Duplication of entry is not checked

Hi all,
Sorry for botheration, the code is now as:

Private Sub TripNo_BeforeUpdate(Cancel As Integer)
 Dim SID As Long
    Dim stLinkCriteria As String
    Dim rsc As DAO.Recordset
 
    Set rsc = Me.RecordsetClone
 
    SID = Me.TripNo.Value
       
    stLinkCriteria = "[TripNo]=" & SID
 
    'Check Add New Cst table for duplicate TripNo
    If DCount(TripNo, "CST", _
              stLinkCriteria) > 0 Then
        'Undo duplicate entry
        Me.Undo
        'Message box warning of duplication
        MsgBox "TripNo: '" & SID & "' has already been allotted." & vbCrLf & _
              "You will now been taken to the record of TripNo. '" _
              & SID & "'.", vbExclamation _
        , "PTF Guide - Duplicate Entry"
        'Go to record of original TripNo
        rsc.FindFirst stLinkCriteria
        Me.Bookmark = rsc.Bookmark
    End If
    Set rsc = Nothing
End Sub

Thanks for replies,
Khalid
_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#115410) | Reply To Group | Reply To Sender | Mute This Topic | New Topic

Your Subscription | Contact Group Owner | Unsubscribe [sugeng.panjalu.access@blogger.com]

_._,_._,_

Re: [MSAccessProfessionals] Duplication of entry is not checked

Change:
stLinkCriteria = "TripNo= & [TripNo] " '"
with
 
stLinkCriteria = "TripNo= '" & [TripNo] & "'"  if TripNo is string else
stLinkCriteria = "TripNo= " & [TripNo] 

Ciao Domenico

Il giorno lun 20 gen 2020 alle ore 08:50 Khalid Tanweer via Groups.Io <khalidtanweerburrah=yahoo.com@groups.io> ha scritto:
Hi all,
I'm working on a form "Add New Cst". On its field Name "TripNo" and Control source is "TripNo" Format Standard, decimal places = 0
On its BeforeUpdateEvent I'm getting a Run time error '3075;
Syntax error (missing operator) in query expression 'TripNo= &
[TripNo]';
I want this message not comes and it should check for Duplicate entry, Event is:

Private Sub TripNo_BeforeUpdate(Cancel As Integer)
     Dim stLinkCriteria As String
     Dim rsc As DAO.Recordset
   'Don 't check if not on a new row
   'If Not Me.NewRecord Then Exit Sub
    stLinkCriteria = "TripNo= & [TripNo] " '"
                     Debug.Print stLinkCriteria
    
   'Check Cst table for duplicate TripNo
    If DCount("*", TripNo, stLinkCriteria) > 0 Then
 
        'Message box warning of duplication
            MsgBox "This Trip No: " & [TripNo] & " has already been entered" & vbCrLf & _
               "at" & [TripNo] & "." _
               , vbInformation, "Duplicate Entry"
 
            'Undo duplicate entry
            Me.Undo
               
            'Go to record of original TripNo
            Set rsc = Me.RecordsetClone
            rsc.FindFirst stLinkCriteria
            Me.Bookmark = rsc.Bookmark
            Set rsc = Nothing
    End If
End Sub
-----------
Please help where is the mistake.
Thanks Khalid

_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#115409) | Reply To Group | Reply To Sender | Mute This Topic | New Topic

Your Subscription | Contact Group Owner | Unsubscribe [sugeng.panjalu.access@blogger.com]

_._,_._,_