Navigating Datagird

Results 1 to 3 of 3

Thread: Navigating Datagird

  1. #1
    UrGeNt Guest

    Default Navigating Datagird

    I have a bounded Data GRid Control.<BR>I want to check for the duplicates when user<BR>adds or modifies the record.<BR>I wrote the event in beforeUpdate. It&#039;s not<BR>allowing me to navigate the Datagrid recordset.<BR>Please let me know how to navigate.<BR>thank you.<BR>

  2. #2
    Join Date
    Dec 1969

    Default You have to use different event

    Private Sub dbg_BeforeColUpdate(ByVal ColIndex As Integer, OldValue As Variant, Cancel As Integer)<BR> <BR> Select Case ColIndex<BR> Case 0<BR> If Duplicate(dbg.Columns(0)) = True Then<BR> MsgBox "You are trying to insert ID that already exists.", vbCritical<BR> Cancel = 1<BR> End If<BR> Case Else<BR> <BR> End Select<BR>End Sub<BR>

  3. #3
    Join Date
    Dec 1969

    Default Problem with the function

    I wrote the Duplicate Function and still i have the same problem.<BR><BR>Private Function duplicate(strvalue As String) As Boolean<BR> Dim stext As String<BR> sCount = 0<BR> dgrdTableMaint.Col = 0<BR> Do<BR> dgrdTableMaint.Row = sCount<BR> stext = Trim(dgrdTableMaint.text)<BR> msgbox stext<BR> sCount = sCount = 1<BR> Loop Until Len(stext) &#060;= 0<BR> duplicate = False<BR>End Function<BR><BR>I was trying to display the grid values. It&#039;s not doing so.<BR>it&#039;s just displaying the lated added value for all the column<BR>although i change the row value.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts