PC Review


Reply
Thread Tools Rate Thread

How to deactivate a command button if record in a query

 
 
doyle60@aol.com
Guest
Posts: n/a
 
      22nd Oct 2010
I want to have a command button on a form to be activated only one
there are no records in a certain query. What is the code for this?
I used to have it but no longer have access to that database.

Thanks,

Matt
 
Reply With Quote
 
 
 
 
doyle60@aol.com
Guest
Posts: n/a
 
      22nd Oct 2010
Thanks. I wanted it to run after the user pressed another command
button. I changed the typoed period to a comma, and retranslated it
into this:

If DCount("*", "CheckIfInputtedAlreadyqry") > 0 Then
Me.Command6.Enabled = False
Else
Me.Command6.Enabled = True
End If

I had a bit of trouble with it at first because I didn't put the query
name in quotations.

Thanks,

Matt
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying data from current record into a new record using a command button Scott Microsoft Access Form Coding 1 8th Jul 2007 07:23 AM
Need to deactivate a command button Melanie Microsoft Access Forms 5 23rd Aug 2004 07:03 PM
Deactivate command button by conditionaly an Microsoft Access Forms 10 17th Jun 2004 05:08 PM
Duplicate Record Command Button goes to previous record Bdehning Microsoft Access Forms 2 9th Feb 2004 06:06 PM
Command Button - to open a new record with some of the data from the current record Mike Hagstrom Microsoft Access Form Coding 1 17th Sep 2003 04:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:27 PM.