dynamically change sub form (using code) on button click...

Hi,

I have a form and the subform allows users to view data or modify data in 
the table.

But for adding new records, I want a simplified view of the table, with only 
therequired columns to be shown in the sub-form.

How can I either change the subform to be opened when the user clicks 'Add 
New' or hide all the fields that are optional?

thanks

Philip
0
Utf
2/20/2008 4:54:00 PM
access.forms 6864 articles. 2 followers. Follow

1 Replies
1514 Views

Similar Articles

[PageSpeed] 1

You can change the form serving as the SourceObject of the subform easily 
enough by including :

Me.MySubForm.SourceObject = "frmMySubForm"

in the OnClick event of the "Add New" command button on the main form.

-Jeff

"Philip" wrote:

> Hi,
> 
> I have a form and the subform allows users to view data or modify data in 
> the table.
> 
> But for adding new records, I want a simplified view of the table, with only 
> therequired columns to be shown in the sub-form.
> 
> How can I either change the subform to be opened when the user clicks 'Add 
> New' or hide all the fields that are optional?
> 
> thanks
> 
> Philip
0
Utf
2/20/2008 7:41:01 PM
Reply:

Similar Artilces:

Changing Area Codes
Is there an easy way to change area codes for a large number of contacts in MSO? Our local area code has changed, and I'd like to update my contact information, especially so I can use my phone dialer effectively. Check out http://www.slovaktech.com/phonechanger.htm -- PATRICK REED [Outlook - MVP]~~~~~~ -Microsoft Certified Professional (MCP) -Have you checked http://www.slipstick.com? -Please post your Outlook version! "kvhhed" <kvhhed@hotmail.com> wrote in message news:41c801c35610$67e06310$a001280a@phx.gbl... > Is there an easy way to change area codes...

Trying to write a formula that changes which worksheet to used
I am trying to write a formula that uses a different worksheet in the current workbook depending on the value from a lookup result and/or the direct entry of a worksheet name in one cell. For instance, if my lookup result is November, I want to pull information from cells on the November worksheet, if December, information from the December worksheet, etc. This way, all I have to do is change the lookup value and/or the entry to get different results based on the appropriate worksheet. This is useful in repetitive activities using the same layout but different numbers. Any help would...

Recover using Trans act logs?
Is it possible to roll back the exchange database to recover deleted emails if I have all the trans act files? What I am looking to do is recover a particular days set of emails; the deletion settings on the Mailbox store on the Exchange 2k3 is set for 1 day...I need to be able to retrieve a series of emails on a particular day last week. The recover deleted email option on the client will not work becuase of such short Exch Server deletion setting (hard delete). Can a recovery be done? If so, would you point me in the correct direction? Many thanks, Mel You'll have to go to ...

service calendar in MS Dynamics 4.0
Does anyone knows how we can achieve the following requirement with MSCRM 4.0 In the service calendar in MS Dynamics 4.0 you are able to create new appointments and service activities. Appointments and Service Activities which are created will be present in the Service Calendar. To see all details of such a record[Subject(default Value)] you must open it. But by moving your mouse on the concerning appointment or service activity, a text-box-view appears with primary information. With appointments the content of the following fields is displayed: 'show time as', 'subject...

execute code after pop-up form closes
I have this code (below) which opens a pop-up form and then after the form is closed should run 2 sub-routines followed by a requery of the current form; however, what seems to be happening is that the subs and requery happen as soonas the form is opened and not when it is closed... I can see how this makes sense, since afterall, it is doing what I am telling it to do (open the form and then do something else); but this is not how I need it to behave... My hunch is that i need to move the subs and requery to the close event on the pop-up? Any suggestions would be greatly appre...

Select Case in a Change Event
Hi, I am trying to use a worksheet Change Event to trap changes to specific columns. depending on which column is chnaged by the user, the value in another ciolumn will be altered; so, changes in either column O or P will update column Q, changes in either column T or U will update column V and changes in column Z or AA will update column AB. What I can't figure out is the Select Case bit (where I've got the shouted question below). Here's what I've put together, any comments would be much appreciated. Private Sub Worksheet_Change(ByVal Target As Range) ...

Chart tabs changing by themself
I have an Excel 2007 spreadheet (.xlsx) file with about 40 charts all in their own sheets. Every one of those sheets used to have their own descriptive tab name. Excel does not seem to like that, however, as sometimes after closing, it just deletes all of my tab names replacing them with a generic Chart3, Chart4, Chart 5 etc. This is highly frustrating of course. I once edited every one of those tab names back to their original names, wasting a lot of my time in the process, hoping it would not happen again. Alas, it sporadically happens again and again... Any ideas/solu...

Changed printer ink tanks
The computor told me I was low on both tanks, so I changed them. Now it won't print a thing. What do I need to do now? Thanks in advance. Take the sticky tape off the cartridge base? Read the manual that came with the printer? Go to the website of your printer manufacturer and look for a FAQ section? A Microsoft Excel group is not really the place to get answers to generic printer questions. But.....we try<g> Gord Dibben Excel MVP On Tue, 15 Mar 2005 15:07:03 -0800, postalpat <postalpat@discussions.microsoft.com> wrote: >The computor told me I was low on both ta...

How to change the the attribute's name???
Hi Group: I would like to know if it is possible to change the name of an attribute to something else. My setup is like this: I have serveral SQL tables that I nest and join so that it all outputs into a nice XML file for the purpose of populating a flash navigation menu. <NewDataSet> <mainMenu_category menu_name="Home" menu_ID="1"> <menu menu_ID="1" /> </mainMenu_category> <mainMenu_category menu_name="Product" menu_ID="2"> <menu category_name="28.5 Volt DC Power Carts" menu_...

dynamic resource
Hi, Anybody know how to load e.g. bitmap into resource dynamicaly? The bitmap file will be downloaded by application itself , so it has to be somehow inserted into resource and displayed. thanks What do you mean by "into resoure dynamically"? Do you want to load a ..bmp file and display it? If yes, take a look at GDI+, which is by far the easiest way to achieve this. ---------- Ajay Kalra ajaykalra@yahoo.com I misspelled this, yes I'd like to load new bitmap on the fly. But resource file looks like is static. I use ATL/MFC applicatation. "Ajay Kalra" <aja...

Change Investement Type
Friends How do I change an investment Type after it has certain transactions. I want to change a "Bond" type into "CD". I had wrongly entered it as bond when it was created. I searched and tried but couldn't succeed. Using Money 2004 Deluxe Thanks in advance Jay In microsoft.public.money, Jay wrote: > >How do I change an investment Type after it has certain transactions. > >I want to change a "Bond" type into "CD". I had wrongly entered it as bond >when it was created. > >I searched and tried but couldn't succe...

Types of Styles and Methods of Changing Style
A style beginner is confused by the terminology. Trying to understand the differences in "style" types: global, all styles, user defined styles, styles in use and available styles. And maybe there are others. Plus, what appears in the style window in the Formatting Toolbar does not match up with what is presented in the style list in the Formatting Palette or in the Style window under Format/Style. Is there a place to go in Word Help or online to understand this? I haven't found it yet. BTW, I'm using Word 2008. Thanks for any tips. Hi Norm, <br...

HOW DO I CHANGE FONT IN A TEXT STING
I am trying to print text with inserted fields in a text box. No problem. Now I would like to underline the inserted fields and change the font size for portions of the text. Your help is appreciated. RingedNeckDuck wrote: >I am trying to print text with inserted fields in a text box. No problem. >Now I would like to underline the inserted fields and change the font size >for portions of the text. That is not an available feature of text boxes. Look around www.lebans.com for a couple of different ways to get that effect. One I know of uses separate text boxes for the nor...

access forms 11-04-07
I am using a template to develop a database - contact management one I downloaded - but whenever I try and change the fields that are displayed in the last tabbed page they show up on the first two tabbed pages - all three tabbed paged existed I simply changed the fields. any thoughts? raine If you select the tab control (the main control) when pasting on the tabs, they will show up on ALL tabs. To get them to display on only one tab, make sure to use CTL+X to cut them off their current location, then click on the actual tab to select the actual tab page you want and then click CTL+V t...

Dynamic sum in Chart
Hello: So I've got this pivot chart that I've created, and it's great, EXCEPT when I select different categories to show up, I want to show a SUM of the categories, not the values of each category. I would appreciate any help/advice you may have. Thank you! Michelle In the pivot table you can select different thing like count and SUM etc. If you right click in the upper left vacant square and chose field settings, then select what you want to see in your data section. Misha wrote: > Hello: > > So I've got this pivot chart that I've created, and it's great...

Display Multiple Images on a form
Hi I am a newbie to access and I am trying to save space in my database by using code to display my images from a folder instead of embedding them directly into the database. I have a table with over 2000 records and 2 to 4 images per record. I am using Access 2003, but the database will be uploaded to an FTP site then downloaded and used by multilple users with probably different versions of Access. I followed the instructions in http://support.microsoft.com/kb/285820 and it worked great to display one image per record, but I need to display up to 4 images per record. Can anybody ...

Tab seq dynamically...
I have a button which added dynamically to a property sheet. Now for setting the tab sequence with this new button, Am using SetWindowPos() method. Now tab sequence is proper. THE PROBLEM IS Through the arrow keys, I could not navigate to the last button for which I called SetWindowPos. where as through tab keys I could go to the last control. I will appreciate ur help in this. DETAILED DESCRIPTION I have three buttons (OK,Cancel, Help)on the property sheet. I added a button "Default" to the property sheet and positioned between Cancel and Help. I set the tab sequence as ...

How to filter color changed cells
Hi guys, I am writing a macro to find the special char in the Balance column(ie. only Numeric format) Its finds and changed cells interior color on the particular column, whiever cells contained specl. But my question is HOW TO FILTER THE CHANGED COLOR CELLS? Is filter possible to changed color cells? Plz help Advanced thanks Venky On Aug 6, 2:45 pm, mvenkatesa...@gmail.com wrote: > Hi guys, > > I am writing a macro to find the special char in the Balance > column(ie. only Numeric format) > Its finds and changed cells interior color on the particular column, > whiever ce...

change to the rule could not be saved (out of office)
Hi Guys Ive got a problem when activating an out of office reply in outlook 2003 exchage it reads "changes to the rule could not be saved" There are no rules added in outlook How can I solve this ...

Using Formulas with Charts
I have a chart that references cells with the following formula =if(a1="","",a1/a2). The formula is used for each month Jan-Dec. I would like to copy the formula across all months. When I do this my data point show as zero for months that have not happened yet. What can I do to not show a line on the chart for a data point with a "" or null value? Thank you, Sandy The cell with the formula isn't blank, and "" does not produce a blank. There is not a formulaic way to simulate a blank, but for many cases, a line chart or XY chart will treat...

SharePoint Alternate Access Mapping to my Dynamics GP BP site
Hello, If I have posted this question in the wrong forum please let me know! I’m looking for some guidance on changing the Alternate Access Mapping for my Dynamics Business Portal site. So I can implement Single Sign On via ISA Server which is supported on one web listener. Present configuration: Default Zone: http://geneva:222 I would like to add: Internet Zone: http://dynamicsbp.proclub.com I presently have another SharePoint Collection (The Main Portal) http://geneva configured which listens on Port: 80. I tried to add the Alternate Access Mapping http://dynamicsbp.proclub.com...

Money changes?
I just got a popup within Money announcing some upcoming changes in online banking. But before I finished reading it, I accidently clicked and dismissed it before I could select anything. How can I get it back? Bruce. In microsoft.public.money, Bruce. wrote: >I just got a popup within Money announcing some upcoming changes in online >banking. But before I finished reading it, I accidently clicked and >dismissed it before I could select anything. > >How can I get it back? File->Restore would probably do it, but if you go to http://articles.moneycentral.msn.com/com...

dynamic charting #2
Hi I have to update a weekly spreadsheet With week numbers in column B x series and three y series percentages in G,H,I columns. Could someone please help I need these to update automatically. If someone can explain in detail I would appreciate 39 2097 2165 68 1770.7 97 96.86 118.43 40 2443.15 2201 -242.15 1548.93 97 111.00 157.73 41 2162.83 2259 96.17 1600.78 97 95.74 135.11 42 2163.08 2241 77.92 1545.1 97 96.52 140.00 43 2137.5 2271 133.5 1664.6 97 94.12 128.41 44 2160.67 2298 137.33 1455 97 94.02 148.50 Ta Brian ...

DCount Criteria from Subform to Main form
Expert, I have an unbound text box on my Main form and I'm trying to pass criteria to a DCount function from the subform to the unbound text box on my main form. How do I go about doing that. Thanks, ...

Need a method to Dynamicly change the X axis Scale on a chart. #2
I dynamically change the amount of data on a chart. This causes the X axis Scale to either to either show too few values or too many values ( a solid black line if too many). I would like a method to dynamically change the scale values in relation to the data span. Joe - Do you want to limit the number of points displayed? http://peltiertech.com/Excel/Charts/Dynamics.html http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=246 Or do you want to link the axis scales to something you calculate in the sheet? http://peltiertech.com/Excel/Zips/SwitchXYAxes.zip - Jon ----...