Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    ipisors is offline Access Developer
    Windows XP Access 2007
    Join Date
    Sep 2013
    Posts
    119
    Without commenting on the logic overall, I think the syntax you're looking for to count non-null records in tbl_proposal would require you to specify which field in tbl_proposal should be counted...if you want to specify non-nulls.

  2. #17
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,736
    What exactly happens? Tell us what did happen if anything.
    Do you get an error?

    You might have to use Me.

    Me.cmdProposals.ForeColor = vbRed
    Me.cmdProposals.FontBold = True
    Me.cmdProposals.FontSize = 14

    The Form load event occurs once at the beginning. When do you want the command to change?

    I don't see any code to reset the cmdProposals to a default/other color.

  3. #18
    angie is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Dec 2013
    Posts
    232
    I am thinking also that I need to specify which field in the proposal table should be counted?
    I have tried the following on load event on the main form where the command button that opens the proposals is located.

    Private Sub Form_Load()
    Dim records As Integer
    records = Nz(DCount("*", "tblProposal"), 0)
    If (records > 0) Then
    Me.Proposal_Button.ForeColor = vbRed
    Me.Proposal_Button.FontBold = True
    Me.Proposal_Button.FontSize = 14
    End If
    End Sub

    The [records = Nz(DCount("*", "tblProposal"), 0)] becomes yellow like this is where the error is.

    Thanks Angie

  4. #19
    angie is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Dec 2013
    Posts
    232
    I was thinking that instead of using a proposal table, could we use a field in the proposal form like "proposal" or "proposal date" these two field are not completed unless a new proposal is entered.
    The form is called "proposal" and the fields to use is "proposal" or "proposal date"
    The name of the command button that is on the main form customer is named [proposal button] which opens the proposal form.
    Maybe this will help a little. Thanks

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 08-04-2013, 07:11 AM
  2. Command Button Help
    By emailloni in forum Forms
    Replies: 5
    Last Post: 07-30-2012, 09:16 AM
  3. Button Command
    By JayX in forum Access
    Replies: 7
    Last Post: 12-27-2011, 12:58 PM
  4. Replies: 1
    Last Post: 07-27-2010, 02:27 PM
  5. Command Button Help!
    By arthura in forum Programming
    Replies: 3
    Last Post: 06-30-2009, 12:55 PM

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