Results 1 to 3 of 3
  1. #1
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496

    forms![FormName].repaint ?

    I have 2 forms open at the same time (with differnt record sources), and I want to update the value of an unbound control [cboPresetOption] on [frmSpec] based on the value of a control [txtPresetTitle] on the current (active) form.
    The record source for the curent form is tbeFixtureSchedulePrintOptions, and with the DLookup() method, I can get the correct value. and with either method (see below for the 2 I've tried so far), it seems to get the correct data into the control, but, my hangup is in getting the second form to display that data (if I close it, and then re-open it, it is correct)

    'requery current form
    Me.Requery

    '< 1st I tried this >
    Forms![frmSpec].[cboPresetOption] = me.txtPresetTitle

    '<then I tried this >
    Dim vtext As String
    vtext = DLookup("[PresetTitle]", "tbeFixtureSchedulePrintOptions")
    Forms![frmSpec].[cboPresetOption] = vtext

    Forms![frmSpec].Repaint


    '-----------------------
    any thoughts what-so-ever would be greatly appreciated...


    many thanks in advance,
    Mark

  2. #2
    DaveT is offline Access Developer
    Windows 7 Access 2010 (version 14.0)
    Join Date
    May 2010
    Location
    Texas
    Posts
    69
    Dim Frm As Form, c As control

    Set Frm = Forms("myForm")
    Set c = Frm!myFieldName

    c = NewValue
    c.Requery
    Frm.Repaint

  3. #3
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496
    seems to me that it ought to work, but it does run at all...
    i wonder if i've got something else wrong; my gut is that's the case
    (never-the-less, thanks )

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

Similar Threads

  1. Replies: 4
    Last Post: 04-01-2009, 08:49 PM

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