Command button on a continuous form

Hi,
I have a subform that lists all the records linked to the main form's 
record. Naturally, there is a new record at the end of the list. I put a 
command button on that subform so that the user can edit the corresponding 
record. But the problem is that all the command buttons are enabled (on every 
single row, even the new record row). I would like to enable only the one 
occurrence that is on the selected record.
Is that possible?
Thanks.
-- 
Jac Tremblay
0
Utf
4/26/2010 8:26:01 PM
access.modulesdaovba 1670 articles. 0 followers. Follow

2 Replies
1369 Views

Similar Articles

[PageSpeed] 27

No, what you probably need to do is to put the command button in the form's 
geader or footer.
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


"Jac Tremblay" <jac.tremblay@donotspam.com> wrote in message 
news:1FF9646D-46EF-47AC-97AA-E73E038A81B2@microsoft.com...
> Hi,
> I have a subform that lists all the records linked to the main form's
> record. Naturally, there is a new record at the end of the list. I put a
> command button on that subform so that the user can edit the corresponding
> record. But the problem is that all the command buttons are enabled (on 
> every
> single row, even the new record row). I would like to enable only the one
> occurrence that is on the selected record.
> Is that possible?
> Thanks.
> -- 
> Jac Tremblay 


0
Arvin
4/27/2010 3:48:45 AM
Hi Arvin,
Thanks for your reply. I knew in the back of my mind that this was not 
possible but I wanted confirmation.
I tried to use the current record number, it's ID, and a combination of 
those, nothing works. When you code:
Me.cmdWhatever.Enabled = False
all the buttons are disabled. Actually, there is only one button.
I have never tried the conditional formating. I was hoping for some miracle 
solution.
Thanks you again, Arvin.
-- 
Jac Tremblay


"Arvin Meyer [MVP]" wrote:

> No, what you probably need to do is to put the command button in the form's 
> geader or footer.
> -- 
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.accessmvp.com
> http://www.mvps.org/access
> 
> 
> "Jac Tremblay" <jac.tremblay@donotspam.com> wrote in message 
> news:1FF9646D-46EF-47AC-97AA-E73E038A81B2@microsoft.com...
> > Hi,
> > I have a subform that lists all the records linked to the main form's
> > record. Naturally, there is a new record at the end of the list. I put a
> > command button on that subform so that the user can edit the corresponding
> > record. But the problem is that all the command buttons are enabled (on 
> > every
> > single row, even the new record row). I would like to enable only the one
> > occurrence that is on the selected record.
> > Is that possible?
> > Thanks.
> > -- 
> > Jac Tremblay 
> 
> 
> .
> 
0
Utf
4/27/2010 11:52:01 AM
Reply:

Similar Artilces:

Forms in two differant views
Is there a way to use the same sub form showing two differant views within the same Main Form. For example: Can I show on one tab a datasheet view and on the other a regular form view. -- Rose Hi Rose, Create a button on your form and under the "OnClick" event put 'Me.DefaultView = Datasheet Alternatively you could use a checkbox If me.checkbox1 = 0 then Me.DefaultView = 2 ' Datasheet Else Me.DefaultView = 0 'Single Form End if me.repaint This should flick the form between datasheet and form views. HTH, Nick. "Rose" wrote: > Is there a way to use t...

Date and time onto a form
Hi, I am designing a form that my client would like the date and time automatically recorded in a field and stored so that when they refer back it shows when the record was done. The 'NOW' function only shows the current date & time and keeps updating. Is there a way of putting the 'NOW' value into a field, then locking it so it doesn't change when the record is reopened. Hope that makes sense! Kazlou The form stores data in a table. You need to add a date/time field to your table to record the date and time a record was last updated. 1. Open the table in desig...

Printing Issues when distributing a form to multiple users
I am distributing a spreadsheet to multiple users. The spreadsheet is being used as a form for data entry. The problem i am having is that when it is being printed, the users are getting varying page layouts where the page breaks have changed, due the changes to the length of the document growing from the free text they are entering. The page breaks that excel chooses don't seem to be spaced well, leading to one or two of the pages being very short (i.e., leaving a lot of free white space), whereas the other pages are taking up the entire page. Is there a particular page layout selection...

PrintPreview
Hello, I developed a VC++/MFC SDI application. The program supports PrintPreview. However, I only want the user to go forward ("Next Page") and not backward ("Prev Page"). How do I hide the "Prev Page" and "Two Page" buttons? TIA, Jacques Hello All, I found a nice Print Preview replacement toolbar (with bitmap buttons) on codeguru. To hide the "Prev Page" and "Two Page" buttons, simply remove them from the CMyPreviewView::OnCreate(LPCREATESTRUCT lpCreateStruct) method. The article was written by Robin J. Leatherbarrow. Thank...

DoCmd.Quit Error "The command or action 'Quit' isn't available now
Hi I need to exit an application if the user closes a certain form in the adp and am trying to do this via the unload method. basically there can be various instances of this form but if one instance is a certain one then it must close the whole application. If have tried in a blank database by putting DoCmd.Quit in the unload method of a form and that works so there must be somthing running that is causing this not to work in my adp. I have also tried putting a button on the form in my adp just to see if putting DoCmd.Quit in the click event would work and it did but this is of no us...

Continual conflict/errors with Outlook/Outlook Express on startup
Hello, I have Outlook AND Outlook Express set to come up automatically on startup. For quite some time now, I sometimes get an error message, saying something to the effect of "switch identities" being turned on in one application, which is conflicting w/ the other. What can/should I do in either program to fix this? Lately (not sure this is related), OE isn't coming up at all -- w/ some Microsoft message coming up saying it had to be shut down (I copied down as much of the technical info as I could today, and it was saved even to a '.txt' file in \Temp, but when...

Outlook Vote buttons integrated with MS CRM campaigns
Does anybody knows a work-around to integrate the functionality of 'vote buttons' in a MS CRM campaign (distributing email activity)? Since the email activity is distributed through the MS CRM email system, it is not possible to add vote buttons? Is there any way to send the campaign emails through Outlook, add voting buttons ("will you attend the event YES/NO"), and when the target member replies with yes/no it would automatically return as an "interested" or "not interested" campaign response...? ---------------- This post is a suggestion for Mic...

dialog based app & command line
Hello, I'm trying to launch my application with command line arguments, but I received an error, without any identification number of it. The MessageBox tolds me: "Runtime error" "the path to my exe file" "This application has requested the Runtime to terminate it in an unusual way. Please contact...". Have somebody a ideea where is the problem? Thank you a lot in advance, Alex PS: When I debbutg the appllication with command line args. from project properties the app. starts very well Try setting the start command line options fro...

How do I insert a radio button into a spreadsheet?
Use menu.. -- dominic ----------------------------------------------------------------------- dominicb's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1893 View this thread: http://www.excelforum.com/showthread.php?threadid=37768 http://www.functionx.com/excel/articles/radiobuttons.htm This should help you. ...

Button form control does not work
I have spent over 5 hours trying to get the button wizard to do a simple thing. Open a form and show data in that form that matches the name in the form where the button is but when i follow the wizard the button allways go to the first entary in the second form eg i have the form (form1) open on emma (record 3) and want to open a second form that also contains emma the wizard puts the following in to a macro form2, Form, , "[Full Name]=" & [Full Name], , Normal but when i test the button it open the second form with the first record which is not emma why d...

continous form question
Hi, I have a 'continous form' which gets its data from a table. Im using a form for ease of use by the operator and data is displayed in text boxes. My form has 6 columns and thousands of rows - so many records in the table. (its pretty much like an excel spreadsheet). However, on my form, i have a text box and i want the text box to change to eg VBred, if the time on the current record matches the time on the next record. (obvousley time is one of the pieces of data and displayed as hh:mm) As my form is a continous form, if i add my 'colour' text box to ...

access forms 12-05-07
how can the minimum value from eight numeric fields be found & displayed displayed on the form, following manual entry? Your only way is through a series of If statements to determine the minimum. Remember, too, that you may need to handle missing data. You can use the Nz function in that case, but you need to be able to assign a reasonable value for comparison purposes if the value is Null. Dim lngMinimum As Long lngMinimum = Nz(Me.Field1, 9999) If Nz(Me.Field2, 9999) < lngMinimum Then lngMinimum = Me.Field2 End If If Nz(Me.Field3, 9999) < lngMinimum Then lngM...

MSCRM 4.0 ISV Custom buttons not visible in Contact Detail Toolbar
Hello, After enabline isv integration in 4.0, I can see in the Accounts detail level toolbar the sample isv buttons, but when I goto Contacts detail toolbar, none are visible. I just added a button to the detail level toolbar in CRM 4.0. It was added basically to the same place as my old 3.0 in the isv.config, but after adding it wasn't visible. I then went to the ReadyServer image from Microsoft, and noticed that the isv.config was not present! (isv.xsd was present and accounted for). Since I could see the isv buttons in the account entity detail toolbar, I added my custom butto...

Outlook 2002: most voting button responses on email not shown on 'Tracking'
We run Exchange 2003, and one woman (using Outlook 2002) sent an invitation with yes \ no buttons out to the whole company. Over 200 hundred responses were received and she has stored them all in a sub folder, however when she opens the original message and goes to the tracking tab, only around a quarter are listed there. She needs the replies in here, so they can be easily exported into a spreadsheet. Why could message tracking have missed so many of the responses? Cronos THe most likely cause is because she moved them. The responses needed to = stay in the Inbox long enough for Outlook...

Set a value on a form
I use the following code to open a form DoCmd.OpenForm stDocName, , , stLinkCriteria Is there any way to pass data to the form (through the constructor) or to set the value of a label on the form Thank you, Samuel You can use the OpenArgs argument to pass a value to the new form, and then use the new form's Load event to read the value and put it into a control on itself. First step -- pass the value: DoCmd.OpenForm stDocName, , , stLinkCriteria, , "ValueToPass" Second step - read the value and use it; this code goes with the Load event of the stDocName form: ...

How to find the check form to use for GP 9.0
I don't want to use Deluxe as our check vendor. I want to use Harland. Microsoft MBS sales just gives us Deluxe's phone number, when we request help with obtaining the correct format for Harland checks. Harland has two check formats for GP payable checks. 1) Great Plains Accounting 7.0 - 9.0 2) Great Plains Dynamics Harland isn't sure and can't reference Deluxe. Thanks, John John, From what I can tell from Harland's website, you want the Laser Multi-Purpose checks they show under Microsoft Great Plains. That's the one with the check in the middle, stub on t...

Bill of Lading form
I am looking for a Bill of Lading form for Dynamics for shipments my company makes. Has anyone found a form that works with the system? I know that the German version of the program has one, beets me why the US version doesn't. A reasonably good BOL form can be created using Crystal or SRS. You will need to use some of the optional fields in Inventory to flag any items that may require special handling, if your firm has any such hazardous materials. -- Richard L. Whaley Author / Consultant / MVP Documentation for Software Users Get our Free Tips and Tricks Newsletter and che...

Problem with iif and datediff expression in form
Hi, I have a form where I have to display the value of the field based on some criteria. The first criteria is =IIf((DateDiff("d",[dbo_PWO_Status].[WorkOrderDate],Now())-180)>0,"Y","") and the second criteria to add is dbo_PWO_Status.[Quote] = -1 My first question is how do I accommodate the dbo_PWO_Status.[Quote] = -1 criteria in the iif statement? The second question I have is that with the first expression put in the source for display I am getting Name instead of the Y value for matching condition. I would appreciate any help. Thanks. You n...

Disable the "New Lead" button on the home_leads.aspx
Hi All, How can I disable the following 1.- "New Lead" button on the grid menu bar. Prioror to the print button? 2.- Disable / alter the menuitems in the "New" menu bar 3.- Disable / alter the menuitems in the "Actions" menu on the grid menu bar One way is setting the rights for the users. Is there any other way to acheive this say by HttpModule handler??? and how to do this.. Thanks in advance.... Prasad ...

e-mail the current worksheet using a form button
I want to create a submit button that when I click on it, the current worksheet/file will be e-mailed to someone. Instead of saving the file, then inserting into an e-mail. I have seen this before in a file before, but can't figure out exactly how it works. I happened to notice in the VB Editor I saw something like... CommandClick() Excel.Application.Send "myname@email.com" End Sub Or something similar to that. I don't know any VBA.. So if that's what I need to learn, then let me know. TIA Richard, check out Ron's site for a LOT of information on this http://...

Align Radio Button text and button
How do you get the text to line up with the button when it is small text? I have a button: <asp:RadioButton id="rdbClients" GroupName="SetupDisplay" style=" font-size: 11px " runat="server" /> If the button is the default size where the text is large, it lines up so the button is at the middle of the text. But when you change the text to a small font, it is still positioned in the same place but since the text is smaller, the button is now aligned with the top of the text because the text is now shorter. Is there a way to get...

Using single button to run multiple query
I want to use single button on the form to run multiple queries. How it can be done? Where should I write queries and code? One way to do this would be to create your queries, then use the command button to run code that calls each query. Another approach would be to create all your queries, then create a macro that runs all your queries, and call that macro using code behind a command button. -- Regards Jeff Boyce www.InformationFutures.net Microsoft Office/Access MVP http://mvp.support.microsoft.com/ Microsoft IT Academy Program Mentor http://microsoftitacademy.com/ "Gajanan&qu...

Use values from a form as criteria in a DSum
Hello All, I have a report in which the end user selects a single person or multiple people from a form and then I store their selection(s) in a temp table (ttmp_Prn_Isu). I have a report that uses this temp table as its datasource so that I can sort and group it properly. All the fields are populated via DSum function because the final report resembles a crosstab report that may contain rows with no data and yet the rows still need to be seen. My difficulty is in referencing the personID stored in the temp table ([ttmp_Prn_Isu].[IsuNm]) as criteria in my DSum function. I also have...

Duplicate the record in form and subform
Hi Allen Browne, I try to use your code to duplicate the record in form and subform but I got a error message "Error#3265". BTW, my primary key value is not autonumber, how to change the code to fit my database? Thanks for your expert comments in advance! Presumably we are talking about this article: http://allenbrowne.com/ser-57.html The "Item not found" error was caused by which line? Whichever line it is, you have some name Access can't identify, e.g. you have not changed the field names to match what's in your form. -- Allen Browne - Microsoft MVP...

How to pass Window name & Form Name Ananymously in procedure?
I want to create generalized procedure for navigation, save, delete, add etc. buttons. But I cannot pass name of the window,name of form anonymously to the procedure. Can I pass name of the window or form in a procedure anonymously as it can be done with tables and fields? I seem to recall that I spent some time on this in Dexterity, and couldn't get it to work. I wish you could. If you find out how, please post or mail me the solution. "Nupur" wrote: > I want to create generalized procedure for navigation, save, delete, add etc. > buttons. But I cannot pass ...