Changing Resource and fields on a subform

I have a subform with fields on it that are present when i first open the
form.  But when I click on a status button, I'd like the subform to change
the fields that are present.

For instance when i first open the fields are formid, lastname, firstname,
subject, date, range
But when i click on formstatus button, i'd like the fields to show: formid,
subject, range, product
I know how to use recordsource to change the recordsource, but then the
fields that I am not using show up as #name?

How do I get the subform to change field names so that the fields I am not
using, doesn't show up in the subform when I change the recordsource?

Thanks,
Tya

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200712/1

0
Tya
12/17/2007 8:03:16 PM
access.formscoding 7493 articles. 0 followers. Follow

3 Replies
683 Views

Similar Articles

[PageSpeed] 13

You could set the visible property of those controls to false. The drawback 
here will be that you'll just have empty screen space where those controls 
used to appear.

Another alternative might be to set the forecolor of those controls to white 
(assuming the backcolor is white), then the controls would appear to be blank.

If you decide to try either of these methods, just make sure you have some 
method of resetting the property back to normal

-- 
_________

Sean Bailey


"Tya via AccessMonster.com" wrote:

> I have a subform with fields on it that are present when i first open the
> form.  But when I click on a status button, I'd like the subform to change
> the fields that are present.
> 
> For instance when i first open the fields are formid, lastname, firstname,
> subject, date, range
> But when i click on formstatus button, i'd like the fields to show: formid,
> subject, range, product
> I know how to use recordsource to change the recordsource, but then the
> fields that I am not using show up as #name?
> 
> How do I get the subform to change field names so that the fields I am not
> using, doesn't show up in the subform when I change the recordsource?
> 
> Thanks,
> Tya
> 
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200712/1
> 
> 
0
Utf
12/17/2007 9:00:28 PM
Hi Tya,
One option is to hide the controls that show up as #name, and show them when 
you want to use them. The easiest way to do this is to have 2 different 
forms for the subform control. The main form loads without any form inside 
the subform control.When you click on the formstatus button, you put the 
appropriate form inside the subform control.
Something like this:

If me.cmdStatus = True then
    me.subform.sourceobject = "[Name of the form you want to use]"
else
     me.subform.sourceobject = "[Name of the other form you want to use]"
end if

Jeanette Cunningham


"Tya via AccessMonster.com" <u7122@uwe> wrote in message 
news:7cd621078d019@uwe...
>I have a subform with fields on it that are present when i first open the
> form.  But when I click on a status button, I'd like the subform to change
> the fields that are present.
>
> For instance when i first open the fields are formid, lastname, firstname,
> subject, date, range
> But when i click on formstatus button, i'd like the fields to show: 
> formid,
> subject, range, product
> I know how to use recordsource to change the recordsource, but then the
> fields that I am not using show up as #name?
>
> How do I get the subform to change field names so that the fields I am not
> using, doesn't show up in the subform when I change the recordsource?
>
> Thanks,
> Tya
>
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200712/1
> 


0
Jeanette
12/17/2007 9:00:49 PM
Ah....
I changed the sourceobject to the subform name.  I ended up creating 4-
subforms to match the 4-status queries that I have.  Then on change in the
cmdStatus, I changed the sourceobject to the subform name i wanted to use.  

Works Perfect....

Thanks Jeanette.

Tya

Jeanette Cunningham wrote:
>Hi Tya,
>One option is to hide the controls that show up as #name, and show them when 
>you want to use them. The easiest way to do this is to have 2 different 
>forms for the subform control. The main form loads without any form inside 
>the subform control.When you click on the formstatus button, you put the 
>appropriate form inside the subform control.
>Something like this:
>
>If me.cmdStatus = True then
>    me.subform.sourceobject = "[Name of the form you want to use]"
>else
>     me.subform.sourceobject = "[Name of the other form you want to use]"
>end if
>
>Jeanette Cunningham
>
>>I have a subform with fields on it that are present when i first open the
>> form.  But when I click on a status button, I'd like the subform to change
>[quoted text clipped - 13 lines]
>> Thanks,
>> Tya

-- 
Message posted via http://www.accessmonster.com

0
Tya
12/17/2007 10:00:58 PM
Reply:

Similar Artilces:

Embedded word doc changed to image-need to change back to word.
I have an embedded word document that misteriously changed into an image. This image is not a word doc converted into a picture (i.e. like I convert an embedded word doc by right clicking and selecting 'image object', 'covert', and then select to activate as a word doc.) but an actual image as if I inserted a picture. Need to turn the image back into a word doc so I can recover my work. It would also be nice to figure out how I am changing to an image, amost seems like a bug since it has randomly happened twice. ...

Effect of Domain change on Outlook
My PC was a stand alone PC that previously belonged to a domain (that was no more in use). I had Outlook running on it that could get my e-mails from several web e-mail services using POP3 (no Exchange). I had a few thousand e-mails in this outlook. For some reason I removed my PC from the Domain and join a workgroup. Now when I launch my Outlook, it wants to start from scratch. Can my previous e-mail accounts, rules, contacts, and vital e-mails be re-stored? Thank you in advance, Ben If you were using a .pst file for your mail storage, it may have a = different name than outlook.pst -...

Stop mail from changing postition once replied to
How can I stop Outlook 2003 e-mail message from changing location in my in box once I have addressed them or replied to them? It scoots them to the bottom of my e-mail list and just rotates them as I work them... sounds like you are sorting by the modified date or icon - click on the received field to sort by it. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Author, Google and Other Search Engines (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange So...

Access 2000
Hello all, I have a field named Field213 that holds (CASETYPE) from the database. When I open the form, I want it to look at that field and make field163 visible depending on what it stored in Field213. Right now it only becomes visible if I manually change what is in field213, then field163 becomes visible. I should mention that I have field163 as visible no and display always, the same as field PBISUB, Field382 and Field163. Probably something simple, but I can't seem to see it right now. I have the following: Private Sub Field213_BeforeUpdate(iC As Integer) If Me!CASETYPE = &qu...

Powerpoint 2007 Excel import change tab
Hi, The situation is as follows: Powerpoint template needs to import data from specific fields from within a tab in excel. This tab name changes depending on the client. Using the "paste Special" i can get the info imported fine. The part i have a problem with is changing the name of the tab to import different data.Powerpoint doesn't have an option under "Prepare>Edit Links To file" If anyone can suggest a solution even a macro to prompt the user to enter the name of the new sheet they want to pull the data from. The Execl file does not change ...

Outlook Client: Change the On Line Server address
Hi, Is it possible to change the address of the CRM server that the Outlook Client uses to syncronise? -- Thanks in advance Chris Hi Chris, You can make this change by editing the following registry key - HKEY_CURRENT_USER\Software\Microsoft\MSCRMClient\ServerUrl. The usual warning - please be careful while making registry edits! HTH, Niths "BoltonWolf" wrote: > Hi, > > Is it possible to change the address of the CRM server that the Outlook > Client uses to syncronise? > -- > Thanks in advance > Chris Thanks for that, I think that works ok. I'...

Manager Assist ...... Field Service Module
Hi to all, I wnat to ask about Manager Assist, that is used to manage the calls on the service call module...... is it a GP module or it is a separate software thank you in advance, ManageAssist is a seperate VB application that connects to the GP Field Service tables. It allows for both viewing of schedule calls as well as updating of certain records (i.e. Unavailable time, sick time, etc.) -- Gary Neumann Field Service Series Designer/Architect "Eng. Tareq Sabri" wrote: > Hi to all, > > I wnat to ask about Manager Assist, that is used to manage the calls on th...

Multi-field search form
Hi there, I am rather new to this place, so I would like to thank you all up front for any and all assistance you may provide. :) It has been a while since I worked with MS Access last. What I am trying to do is create a multi-field search form, where any of the fields can be filled which will display a result set. Preferably if no selection in the fields is made, the entire resultset should be shown - this is not a requirement, though. I seem to be a bit at a loss on how to procede with this task or to find any resources to help me get along. Again, thanks for any and ...

Publisher 2007: How do I change dates on calendar page in newslet
I'm creating a newsletter. I added a calendar page. In previous versions of Publisher, I was able to get to Calendar Options to change the month. In Publisher 2007 when I insert a calendar page into a newsletter, I can no longer access the Calendar Options task pane. Please describe how to change the dates. The calendar wizard is broken. Hopefully it will be fixed in a future service pack. Meanwhile you will have to manually change the calendar dates. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Stephanie" &...

get/change first operation on table 'uprEmployeeCount' failed
I created a 'test' company on V10, restored the backup from our real company into this test company. I have inactivated all the employees in the test company. Unless I enter Dynamics as sa, I get the following message: A get/change first operation on table 'uprEmployeeCount' failed accessing SQL Data. Under the more info button: [Microsoft][ODBC SQL Server Drive][SQL Server] The EXECUTE permission was denied on the object 'zDP_UPR41600F_1',database 'DYNAMICS', schemo 'dbo'. I have deleted the UPR41600 table and recreated it but I still get the...

Edit the Auto Fill in the To: field
On the Send new message window, is there a way to edit the auto fill list for the To: Field. when i start to type in a name in the To Field the auto fill will provide a list of names to choose from. the one i most use is on the bottom of the list. How do i edit the list to get the one i use most to the top? Do you use the others as well? Editing the list will remove them from the list. If you again use the names, they will be added back to the same position. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the Swen virus, all e-...

Durations keep changing... Help!
Ok... it's me again - brand new user... I need to list resources (sometimes multiple) for each task, but ONLY show it shows up on a report for each person. We do not assign or track real/actaul hours. So here's what I've done to try to simplify... Task #1: Tasks/Advanced Tab: "Must Start On" with a start date (this is the only constraint I've set in the project); Fixed Duration; Effort Driven unchecked All other tasks have the same settings except no constraint date and default to "As Soon as Possible." Each Resource: Booking type - P...

Lost ability in MSWord to make ANY changes to ANY document
Somehow when I open a document in Word, it will not let me do anything other than open the document, print and close, everything else come up 'faded'- I can't even make changes anymore, and i've tried restoring my system to an earlier date, but nothing- Version of Word? If it's 2007 and someplace on the screen it says something about "This modification is not allowed because selection is locked", it could be that you've been using a trial version that's now expired or you haven't properly activated your full version. -- Cheers! Gor...

Help with a formmula change in a "flag" parameter!
The formula I have below in Column R works just fine. It creates a flag for me (in Column R) that lets me know one of two things: “Client Failed to Enroll on Time”, and “Return Referral Form to Referent”. Here is that formula: =IF(H4="","",IF(K4<>"","",IF(S4="Sent","Client Failed to Enroll on Time",IF(AND(K4="",TODAY()>WORKDAY(H4,10,AA4:AA12)),"Return Referral Form to Referent","")))) The one change (addition) that I’d like to make, is this: If Column N is toggled to say “Hudson ...

display the value of an unbound textbox in a field within a table
I created 3 textboxs to calculate the number of business days between 2 dates. The 3rd textbox contains the value. I now want to have this value displayed in a table field. I'm sure this is easy but I'm a complete novice and have spent far too much time on this already. Can anyone help! Fibi, The general concept of tables is that they are for storage of data in the background. They are not for display of data. That is what forms and reports are for. Therefore, the appearance of the data in the tables is not normally relevant, and the display of calculated values is im...

how field name output same as input
Thanks for any help. I have a query from a couple tables, and one of the field names in the table is 'IGP' and I have a field in the query that was IGP and now I changed to IGP: iif(blah IGP blah) which gives me a circular error. The table is used by a bunch of other things, so I don't want to change the field name there, and the field name for the output is used by a bunch of things, so nor do I want to change the name there. I am using Access 2007. I thought about changing the output field to IGP_, and I could change the embedded queries in Excel that use it, but...

passing non-field value into vba
I need to pass the line item sequence number (lnitmseq) from the sales item detail entry window into vba. This isnt a visible field in the window, so i cannot "add field to vba" using the TOOLS --> customize toolbar window. Anyone have any idea how this can be done? Using the Modifier you can make the field visible, add it to VBA and then remove the modified window or make the field invisible again. While in the Window Layout mode, make sure that the Invisible fields are shown (Layout >> Show Invisible Fields) and then change the Visual Property, Visible = true and mov...

how to add a resource from a different project in to existing one
I created one project with so many dialogs. But now I hav eto go for another project as there is change in userinterface but much of the dialogs will be useful to me. Is there any short cut so that I can use that project resource in to my project. I am in VS 8.0 Pls guide. Thanks If the dialogs can be reused in both projects, you could wrap these in a dll (resource only or a regular MFC dll). Another option would be to cut paste the resources in resource editor. --- Ajay Bhargs wrote: > I created one project with so many dialogs. > But now I hav eto go for another project as there is...

Derived Field
I'd like to add a derived field to this situation: Parent Table : Shipments (pk)Shipment_No Shipment_Date Shipment_Size ....other fields... Child Table : Shipment_Inspection Shipment_No (connected field) Number_Out_Tolerance (bad ones in the shipment) ....other fields... I'd like to make a derived field "der_percent_good" that takes the shipment size that the inspection belongs to and does (1 - Number_Out_Tolerance/Shipment_Size)*100 to find the percent of the shipment that is Good. Thanks! ...

Date/Time field calculation
Hello, i am trying to make a sum calculation on a field that keeps duration of time. How can i do this? I get errors or zero as result. Thanks On Jun 21, 10:02 am, Stathis <s_paraske...@hotmail.com> wrote: > Hello, > i am trying to make a sum calculation on a field that keeps duration of > time. How can i do this? I get errors or zero as result. > Thanks You need to do the calculation at a level at least 1 level below what you want the answer to be in. Example msgbox DateDiff("h", #6/20/2007 1:00:00 AM#, #6/20/2007 1:30:00 PM#) will give an ans...

Rule not matching "from" field
I want to set up a rule that will match words in the "From" field. Sometimes I get mail like this: From: bill@somedomain.com [mailer@someotherdomain.com] I want to match "bill@somedomain.com". I can't figure out how to match it. I can't pick "from people or distribution list" because it won't let me match arbitrary email addresses. I can't pick "with specific words in the sender's address" it just doesn't work. So far as I can tell, it will only match the part in the brackets. Anon E. Mouse <fake@fake.com> wrote: &...

VS2003
Hello, I have a dialog resource and have created CDialog and a CFormView classes for this dialog. If I right-click a control in my dialog I can create a variable for the control, but how do I specify which class the variable belongs to, ie. my CDialog or CFormView class? I don't see how I can tell the add variable class wizard to which class the variable should be added. I'm converting a Dialog based app to a doc-view type app and am experimenting with CFormView, which is why I have CFormView and CDialog classes referencing the same dialog resource. Thanks for any help. -R...

P2002 S-L-O-W on Page Change
Recently "upgraded" to Publisher 2002 from Publisher 2000. A three-page document now requires about 45 seconds to switch from one page to another. One of the pages has about 12 text frames and 3 photos. I copied the file and removed all frames. Same delay. (And this file, that now has no visible content, has a size of 2.2MB.) This behavior is identical on two machines (removed 2002 from one machine and installed on another.) First machine is W2K, 600MHz, 256MB. Second is XP, 2.3GHz, 512MHz. Is this video related? Both machines have 64MB display cards. All Office, OS,...

Hide a field in a report
I am building a report using fields that are in tables. One of the fields in the report is "Do Not Use". I want to build an expression that says if "Do Not Use" is marked "1" in the table, then remove that line from the report. If "Do Not Use" is marked "0", keep that line in the report. Please help! Thanks! In your query use a calculated field like this -- Hide_Field: IIF([Do Not Use] = 1, Null, [Do Not Use]) Then in the report set the textbox Can Grow property to Yes and drag the size of the textbox to a hairline. If the output is...

Highlight changes within cell
Good morning! Using Excel 2003 I need to highlight the changes I’m making within a cell. For example: In cell B2, is the customer’s original order quantity of 200. I revise it to show 225 and I’d like the cell to be highlighted in yellow. I can then copy and paste the info into an email to show the customer which items have been revised. I’ve tried using Track Changes, but it seems that I have to click on the Track Changes button each time I open the workbook. It also doesn’t keep the revision highlighted for a copy and paste. I have 20+ worksheets within the workbook an...