Results 1 to 9 of 9
  1. #1
    ChobeyGuddu is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2016
    Posts
    29

    field with Text Datatype in Bound form not updating

    HI
    in My database i have a field which is causing me problem...



    In a Form - A field called MW Existing TNE:- is a TEXT Field where it can hold numbers or text...
    in Table its TEXT as well.

    But for some reason this field is giving me -1 or 0 values in return when i search any details in form.
    All other fields in form works fine- the only above filed is not working properly

    I have made it exactly the same as other fields property which is text as well - but not had any joy or luck..

    Any reason or anyone shed some light how can i fix it please.

    Click image for larger version. 

Name:	Error message.JPG 
Views:	8 
Size:	14.6 KB 
ID:	27400Click image for larger version. 

Name:	Table Format.JPG 
Views:	9 
Size:	41.0 KB 
ID:	27401

    Thanks
    Guddu

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    -1 and 0 are Boolean values which you can get if you have a formula e.g.

    a=b

    will return -1 if true and 0 if false

    what is the controlsource to the control on the form? - and have you set any format properties to that control?

    perhaps in your recordsource you have set something like a=b thinking it is a criteria?

  3. #3
    ChobeyGuddu is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2016
    Posts
    29
    Click image for larger version. 

Name:	Data_Property of Field.JPG 
Views:	8 
Size:	22.5 KB 
ID:	27402Click image for larger version. 

Name:	Other_Property of Field.JPG 
Views:	10 
Size:	34.2 KB 
ID:	27403

    Hi Ajax,
    There is no Change in Property from my end..
    it has controlsource as default - bound form - so direct from table.

    Thanks
    Guddu.

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    only other thing I can see is

    when i search any details in form
    how are you searching? what is the code?

  5. #5
    ChobeyGuddu is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2016
    Posts
    29
    Private Sub cmdSearch_Click()
    Dim bkmk As Variant
    Dim strField As String
    Me.RecordsetClone.MoveFirst
    'Find the first record that matches what
    'is in the search text box.
    Me.RecordsetClone.FindFirst "XHostCell Like " _
    & Chr(34) & Me.txtSEARCH & "*" & Chr(34)



    If Me.RecordsetClone.NoMatch Then
    MsgBox "No Match"
    Else
    bkmk = Me.RecordsetClone.Bookmark
    Me.Recordset.Bookmark = bkmk
    End If
    End Sub

  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    Hmm, nothing stands out as being a problem

    I presume the fields in the table do not contain 0 and -1?


    Assuming not, can you upload a copy of the db? Remove unnecessary tables, forms etc., remove or change any sensitive data, then compact the db and zip it

  7. #7
    ChobeyGuddu is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2016
    Posts
    29
    HI Ajax,

    Thanks for your help mate...

    I just found the issue in my code...

    I had a code while searching a details with if condition

    if X=Y then
    Me.MWExistingTNE = False (instead of Me.MWExistingTNE.Enabled = False)

    Else: Me.MWExistingTNE = True (instead of Me.MWExistingTNE.Enabled = True)

    Which is making it boolean values instead of taking data from ControlSource.

    Many thanks for your help again.. mate ...
    Sometime a simple mistake can take you long way down - thats what happend to me today...


    Cheers
    Guddu.

  8. #8
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    So this wasn't true then

    There is no Change in Property from my end..

  9. #9
    ChobeyGuddu is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2016
    Posts
    29
    Yes- Silly me
    Sorry mate

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 07-13-2016, 08:28 AM
  2. Replies: 3
    Last Post: 02-01-2016, 03:14 PM
  3. Replies: 6
    Last Post: 01-30-2014, 05:57 PM
  4. Replies: 2
    Last Post: 06-11-2012, 09:37 AM
  5. Updating using form bound to a query
    By onechriswhite in forum Forms
    Replies: 5
    Last Post: 07-25-2010, 04:04 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums