Results 1 to 2 of 2
  1. #1
    markcrobinson is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Location
    New Hampshire, US
    Posts
    31

    Building a Form in VB

    I need to display a set of columns beginning with a certain date.


    ex. Enter Start date: 052020
    ex: Name 052020 062020 072020 082020 092020 ....
    In a vb Program I build a SQL statement and create a query.
    Works Great:
    Set qdf = CurrentDb.CreateQueryDef("DisplayMARS", msqlMARS)
    DoCmd.OpenQuery qdf.Name

    Problem is, now I need conditional formatting so that entries < 0 are highlighted. Apparently, I can't do that in a query so I built a datasheet form with conditional formatting that displays the query.
    ... But I can't build the form in vb script, can I?
    How can I get the form to start at the date where I need it?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Since this is an Access forum, do you mean VBA?
    I think it can be done but I wouldn't.
    Assign generic names to fields so form or report won't have to be redesigned just because data changes.
    Use expressions in textboxes to serve as 'labels'. Use concept described in this link http://www.access.hookom.net/Dynamic...rosstabRpt.htm
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 11
    Last Post: 05-16-2019, 12:53 PM
  2. Replies: 1
    Last Post: 11-05-2018, 10:26 AM
  3. Need help building a form
    By Cesar333 in forum Forms
    Replies: 1
    Last Post: 11-02-2016, 05:42 PM
  4. Building Access Form
    By chalupabatman in forum Forms
    Replies: 20
    Last Post: 08-16-2016, 05:29 PM
  5. building a search form in Access 2010
    By Milade8080 in forum Forms
    Replies: 8
    Last Post: 07-13-2014, 10:49 AM

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