Object Source / Record Source

Hello

I have created a database regarding the School System.

I have created three forms (one form and two subforms)

one main form is (Students) where i enter student's name, father's name, 
phone, address etc.

now on the main Student form i want to place a subform. But the thing i want 
to know is:

I want to make two buttons on my main form (Fees) and (Progress).. because i 
have two subforms (sbffees and sbfprogress)

now the record source of subformbox should be controled with these two 
buttons. when i click the ( Fee) button the Source Object should be 
(sbf-fee)
and when i click the (Progress) button the Source object of the subform 
should be (sbfProgress)

How can i do this..... and Advance thanks for the repliers because i am 
sure, i will get from here what i need.
-- 
Best Regards

Shakeel Ahmad

shakeel.ahmad215@gmail.com
www.groups.yahoo.com/group/islam-the-final-truth
www.geocities.com/shakeelahmad_79 


0
Shakeel
4/18/2007 12:47:36 PM
access 16762 articles. 2 followers. Follow

9 Replies
1046 Views

Similar Articles

[PageSpeed] 36

I have a easy solution for you

first lets take the subforms
subform fee
subform progress

now for example you want subform fee shown by default (could be
progress it doesnt matter just choose one)

now create the 2 subforms
name them with easy recognizable names.
put subform progress visible = false (so its not shown on first
opening)
then superimpose both subforms. now create code for both button and on
the Fee button
code it so it does like this
subformprogress.visible = false
subformfee.visible = true

 and do the inverse for the progress button.

both buttons will only make disappear the other form and show his.
just make sure your link between student table and subform are
correctly made and nothing else than visibility will be touch :P

0
Franck
4/18/2007 1:43:24 PM
oh yeah i forgot, you could even do a update of the subform with vba
code when it show back the form
dont remeber the code exactly but should be
me.subform.update

0
Franck
4/18/2007 1:44:28 PM
Thanks for your quick reply.

I am going to try it.


"Franck" <the_darkblast@hotmail.com> wrote in message 
news:1176903868.081963.134970@p77g2000hsh.googlegroups.com...
> oh yeah i forgot, you could even do a update of the subform with vba
> code when it show back the form
> dont remeber the code exactly but should be
> me.subform.update
> 


0
Shakeel
4/18/2007 2:04:16 PM
Alternatively, you create the Forms to be embedded in the Subform Control, 
and your buttons simply reset the "SourceObject" of the Subform Control to 
the proper form. It will be simpler if the main-form Field you specify as 
LinkMasterFields for the Subform Control matches a field that you will 
specify as LinkChildFields (whose name is the same in the RecordSource of 
each of the Forms that you'll embed in the Subform Control).

 Larry Linson
 Microsoft Access MVP


"Shakeel Ahmad" <shakeel.ahmad215@gmail.com> wrote in message 
news:O13T%23ebgHHA.4872@TK2MSFTNGP03.phx.gbl...
>
> Hello
>
> I have created a database regarding the School System.
>
> I have created three forms (one form and two subforms)
>
> one main form is (Students) where i enter student's name, father's name, 
> phone, address etc.
>
> now on the main Student form i want to place a subform. But the thing i 
> want to know is:
>
> I want to make two buttons on my main form (Fees) and (Progress).. because 
> i have two subforms (sbffees and sbfprogress)
>
> now the record source of subformbox should be controled with these two 
> buttons. when i click the ( Fee) button the Source Object should be 
> (sbf-fee)
> and when i click the (Progress) button the Source object of the subform 
> should be (sbfProgress)
>
> How can i do this..... and Advance thanks for the repliers because i am 
> sure, i will get from here what i need.
> -- 
> Best Regards
>
> Shakeel Ahmad
>
> shakeel.ahmad215@gmail.com
> www.groups.yahoo.com/group/islam-the-final-truth
> www.geocities.com/shakeelahmad_79
> 


0
Larry
4/18/2007 5:45:30 PM
On Apr 18, 1:45 pm, "Larry Linson" <boun...@localhost.not> wrote:
> Alternatively, you create the Forms to be embedded in the Subform Control,
> and your buttons simply reset the "SourceObject" of the Subform Control to
> the proper form. It will be simpler if the main-form Field you specify as
> LinkMasterFields for the Subform Control matches a field that you will
> specify as LinkChildFields (whose name is the same in the RecordSource of
> each of the Forms that you'll embed in the Subform Control).
>
>  Larry Linson
>  Microsoft Access MVP
>
> "Shakeel Ahmad" <shakeel.ahmad...@gmail.com> wrote in message
>
> news:O13T%23ebgHHA.4872@TK2MSFTNGP03.phx.gbl...
>
>
>
> > Hello
>
> > I have created a database regarding the School System.
>
> > I have created three forms (one form and two subforms)
>
> > one main form is (Students) where i enter student's name, father's name,
> > phone, address etc.
>
> > now on the main Student form i want to place a subform. But the thing i
> > want to know is:
>
> > I want to make two buttons on my main form (Fees) and (Progress).. because
> > i have two subforms (sbffees and sbfprogress)
>
> > now the record source of subformbox should be controled with these two
> > buttons. when i click the ( Fee) button the Source Object should be
> > (sbf-fee)
> > and when i click the (Progress) button the Source object of the subform
> > should be (sbfProgress)
>
> > How can i do this..... and Advance thanks for the repliers because i am
> > sure, i will get from here what i need.
> > --
> > Best Regards
>
> > Shakeel Ahmad
>
> > shakeel.ahmad...@gmail.com
> >www.groups.yahoo.com/group/islam-the-final-truth
> >www.geocities.com/shakeelahmad_79

ya but that would reload the subform each time.
i dont really like reloading and reloading stuff. i prefer load once
and switch betwwen. Unless your computer have like
16meg ram :P

0
Franck
4/18/2007 7:19:05 PM
"Franck" <the_darkblast@hotmail.com> wrote

 > On Apr 18, 1:45 pm, "Larry Linson" <boun...@localhost.not> wrote:
 >> Alternatively, you create the Forms to be embedded in the Subform 
Control,
 >> and your buttons simply reset the "SourceObject" of the Subform Control 
to
 >> the proper form. It will be simpler if the main-form Field you specify 
as
 >> LinkMasterFields for the Subform Control matches a field that you will
 >> specify as LinkChildFields (whose name is the same in the RecordSource 
of
 >> each of the Forms that you'll embed in the Subform Control).
 >>
 >>  Larry Linson
 >>  Microsoft Access MVP

 > ya but that would reload the subform each time.
 > i dont really like reloading and reloading stuff. i prefer load once
 > and switch betwwen. Unless your computer have like
 > 16meg ram :P

Perhaps you did not see the first word in my response?  "Alternatively" 
means I am offering an alternative for the user to consider.

One would have to do more performance testing that is likely warranted to 
determine whether changing the Source Object performs less well than the 
overhead of having two Subform Controls, each with a Form, both 
synchronizing when the main Form's Record changes.

I've done this both ways, and couldn't see any performance difference with 
the data I was dealing with.

  Larry Linson
  Microsoft Access MVP





0
Larry
4/18/2007 11:51:47 PM
try with over 100,000 records with joints everywhere, but i have to
admit it's rare doing this with that number records, the person
needing to do this should change to sql before reaching millions of
record (+1 gig database). i saw something like this in a POS system we
had to use multiple access database linked tables in that case your
solution is better because the invisible thing was to heavy on the
system we had 7 subform with huge record sets each loading them all at
begining was causing a good 5 minutes waiting line before the form
completly loads up. it was better to load it up and load only 1
subform and change the record source only.

0
Franck
4/19/2007 1:09:30 PM
"Franck" <the_darkblast@hotmail.com> wrote

 > try with over 100,000 records with joints everywhere, but i have to
 > admit it's rare doing this with that number records, the person
 > needing to do this should change to sql before reaching millions of
 > record (+1 gig database). i saw something like this in a POS system we
 > had to use multiple access database linked tables in that case your
 > solution is better because the invisible thing was to heavy on the
 > system we had 7 subform with huge record sets each loading them all at
 > begining was causing a good 5 minutes waiting line before the form
 > completly loads up. it was better to load it up and load only 1
 > subform and change the record source only.

There are many Access / Jet databases running very successfully, and with 
adequate performance, with hundreds of thousands or millions of records. 
There are also Access / Jet databases running very successfully, and with 
adequate performance, with multiple backend databases containing their 
linked tables. It is, precisely, those situations where very careful 
planning / testing / experimentation has to be done for performance.

You are correct, however, that those are rare, and I do not typically offer 
advice that will cause extra effort for the implementer in what I expect to 
be the "normal" case.

In fact, in such cases, I would most likely not use the standard 
LinkMasterFields and LinkChildFields to synchronize, but would test to see 
if performance were better if I created a specific query to apply to the 
Form embedded in the Subform Control so that the database engine would do 
the data manipulation (it is likely to be far more efficient at 
selecting/returning data than Access is at sychronizing).

And, in my experience, issues such as logging, reliability, and 
recoverability most commonly  have much more to do with the decision to use 
a server database than volume of data or performance.

 Larry Linson
 Microsoft Access MVP 


0
Larry
4/19/2007 5:39:02 PM
it's there that SQL server can come to the rescue as the backend and
either Access/Vb/C as frontend.

0
Franck
4/19/2007 6:14:48 PM
Reply:

Similar Artilces:

Unit cost recorded incorrectly when over receiving PO
Have a situation where the system recorded a unit price at 1/3 the actual unit cost. The PO had 1 unit. There also was a second PO with the same unit where 5 were ordered. On the first PO 3 were received. The system is recording a recieved value as the PO 1 unit cost divided by the Received three units. I thought no matter what it would record the receipt as 3 units each at the cost on the PO. In this case 565.34 was received at 188.45. It should have received them all at 1696.02. In this case the warehouse screwed up but the system does not need to make it worse. help? Is is possible...

Hyperlinks
Just getting back into Excel after long time away so a bit rusty I have built a macro that will create hyperlinks for many rows o results and the destination cells or ranges may be hyperlinked severa times, dependant on the results. Can anyone tell me whether it is possible to create icons in th destination sheet/file which, when clicked, will take the user back t the cell or range that holds the hyperlink? Putting the icon issue to one side, can the destination sheet revea which file/sheet is hyperlinking to it? Thanks FOR THOSE INTERESTED THE WORK I AM DOING CONCERNS MAPPING RISK SCORE...

Records not updating
I have the following code in my AfterUpdate event. I have tested it and it looks like it's going to work, but then the data doesn't get updated. What am i doing wrong? Dim rs2 As DAO.Recordset Set rs2 = Forms![frmToQCLog_v2]![frmHotSheetRecv].Form.RecordsetClone rs2.FindFirst "[ITEM] =" & Me.ITEM rs2.Edit rs2![Recvd] = True rs2![RecQty] = Me.QTY_RECV rs2.Update -- Matt Campbell mattc (at) saunatec [dot] com Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200708/1 Is the Micr...

Objects duplicated
If a workbook consists of Objects: Sheet1, Sheet2, This Workbook.... What would cause Excel to duplicate these objects in the same workbook. Somehow, I now have to sets of objects in the same workbook that are exactly the same. ...

Event ID 8230
Since upgrading "in-place" our Exchange 2000 Exchange servers to Exchange 2003-SP1 we have been experiencing warning events on our back-end servers: "An inconsistency was detected in user@domain.com: /Calendar/filename.EML. The calendar is being repaired. If other errors occur with this calendar, please view the calendar using Microsoft Outlook Web Access. If a problem persists, please recreate the calendar or the containing mailbox. " Anyone know what these means? I'm assuming that this is due to the upgrade of IIS (our back-end Exchange servers were als...

cannot shift objects off sheet, but also cannot find objects
Trying to hide columns gives error "cannot shift objects off sheet." Try as I might, I cannot find any objects in or near the offending columns; indeed, there are no objects on the entire sheet. I went to Tools>Options>View>Objects and selected "Show All," but still nothing appears. An easier way to see if there are any objects on a sheet is through F5-Special. Cell comments are objects too. Do you have any of them? -- Jim Rech Excel MVP "danielo" <anonymous@discussions.microsoft.com> wrote in message news:0cff01c47b0d$f5a72620$a601280...

workflow emails add hyperlink back to regarding record
Hello all!! The subject may not make much sense, but what I am looking for is a way to add a hyperlink to an email created by workflow. For example, I have a workflow rule for appointments that fires on status change. (when the appointment is completed). It sends an email to the manager with a title “the appointment has been completed: [appointment title]. I would like to add a link in the body of the email that will allow the manager to open up the closed appointment. I have tried the syntax &appointment.activityid; (like in 1.2) to get the appointment guid, but that failed....

How to record which objects a user clicks on
Hi, New to the forums here. I would like to know how to track which objects a user clicks during a powerpoint presentation. I realize this will probably require a macro and that is where I need help. I'm fairly tech savvy, but I don't know how to program in VB. Whenever there is a mouseclick on an object in the slideshow, I would like two things to happen: 1) Advance to a particular slide (which I see can be set easily in the program) 2) Write data, to a separate file (it can be a text file), that reports which object was clicked. This would happen in the background so t...

Problem With Opening Embedded Object After Turning On "Track Chang
In order to use the routing function, I'm using company forms created in excel. On another tab, I've embedded "as icon objects" any supporting material created in Word. This works great, as recipients can double-click these icon objects and launch the documents in Word to view them. The problem occurs when I decided to add "Track Changes" to the files I am routing. When this is done, the icon objects still appear but can no longer be double-clicked. The online documentation in excel indicateds that you can't insert any embedded objects after "T...

How do I group objects and Word Art in Publisher?
I am creating a button and have our company logo along with a slogan that I put in Word Art. I would like to group these two items together so it will be easier to move around as one object. I have tried using the "select object" tool and it will not let me group them. It just moves my objects around and not as a group. I don't quite understand. Do you have a border around your page? If so send it to the back and try selecting your logo and WordArt again. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Fal...

Turn off object theme colors
I have a presentation with a number of objects (mainly simple shapes like circles and squares) that have powerpoint theme colors. I now want to copy and paste them into another Powerpoint that has a different theme. I of course don't want the colors to change. Other than going into each object and changing the color into a customized color, is there any way I can get these objects in using their original color - not tied to the theme? Hi When you paste the objects into the other presentation you'll get a little clipboard in the bottom right hand corner - click on ...

Flag alerting user to record sale of an asset
When an asset is retired with proceeds, our customer would like to see a flag that alerts a user so they know they need to enter a bank adjustment to record a transaction for proceeds and cash. (Similar flag when a new asset is added in purchasing.) The users have separate duties and there is nothing in FA alerting a user that an additional step is required to complete the sale of the asset when a retirement takes place. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I ...

Insert Object File path when attaching OLE Objects
When attaching a note and click on the paper clip, I go to Edit Insert New Object to attach a word document or an excel file. When I select 'Insert New Object' the Insert Object screen opens and I select the Create from File option. The path showing there is the path where GP is installed, in my case - c:\Program Files\Microsoft Dynamics\GP\. Is there a way I can change this default path? Maria, I am afraid this path defaults from the location of your DEX.INI file, which in the case of GP 9, can be found typically under the GP root folder, in the case of GP 10, under the GP...

Advanced Find should let me search records between two dates
When searching the system for records, many times I need to search for records that came in between two dates. For instance, I would like to be able to pull all records input in CRM between March 1 and March 15. In 3.0 you can only query specific dates like "Last X days," "Last X Months," "On," "On or After," etc., but you cannot search the date fields between two dates. The functionality was available in 1.2 but is not available in 3.0. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the...

WTL objects dependent on what runtime objects?
If I make and distribute a WTL program, what DLL's (if any) must also be present? I mean, if I make an MFC application, I assume that my installation program is also going to need to make sure that MFC42.dll and maybe a couple of other DLL's is on the target machine and up to date. What is a WTL program dependent upon? *********** Richard Lewis Haggard "Richard Lewis Haggard" <HaggardAtWorldDotStdDotCom> wrote in message news:OBcsU13uDHA.640@tk2msftngp13.phx.gbl... > If I make and distribute a WTL program, what DLL's (if any) must also be > present? I mean...

avoid duplicate record.
I have a club members database. The member table includes member's Last Name and First name. I need to prevent multiple entry of the member but still allow entry for persons having same last name. for instance: first record Last Name: Smith First Name: John If clerk enters Smith John again, it should give him an error Message something like : " Smith, John already exists in the database " However, if Smith Rebeca joins the club, there should be no problem to put the record. How to make the entry checked against two fields , and prompt for the error only if both...

Embed a modeless cdialog derived object into a cformview derived object
I am creating an mfc application and would like to know if this is possible at all (not very experienced with MFC). I have an SDI application with a CFormView derived object. Inside this form I want to embed a CDialog derived modeless dialog which contains controls that I want to reuse throughout the application (a few edit boxes, a couple of buttons). I'm at the point where the CFormView gets displayed, and at this moment I want to embed in it my dialog object. First of all: am I going about this the right way in trying to reuse a dialog? I tried the following code: CSelectOriginType i...

Query tables to add new records
My query returns selected records from a table. Works fine How do I select only certain records from that query to add new records to another table. That tables fields are: caCommuned type yes/no checkbox need this to become check for true caDate type Date/time Shortdate need this to be filled with a certain date I select casID type Number longinterger foreign key Need this to fill with the sID The Select Query returns fields from table Souls sID type autonumber primary key sStauts type text sorted as sCommunicant type yes/no checkbax criteria true sLSName type text sorted as s...

Scrolling to specific record in continuous subform
I have this code on a main form in the Form_Load event. I am adapting this from someone else's sample. I want the code to find and select the first record in a continuous subform that is greater than or equal to todays' date. Once it does that, I want the current selected record to scroll up inside the subform to be the first record in view. I think this is working properly to find the record but the record does not scroll into view. In one example, there are five records in the subform. The subform is sized to show two records at a time. The fifth record has a date greater than today...

Sheet Protection / Edit Objects 12-05-09
I have a spreadsheet with multiple objects that I'm trying to lock. My problem is I also have cells that I need to have comment insertion capabilites. When going to Tools/Protection/Protect Sheet and allow Edit Objects is checked I can insert a comment. However, it also allows the other objects on the sheet to be accessed. Is there a way to allow the Edit Objects option in a specified range of cells and still protect the sheet? Perplexed.... Keyrookie -- Keyrookie You would have to have that range without the checkbox for locked checked: FORMAT CELLS>PR...

Query Not Returning Correct Amount of Records
I have 6 tables that I have built 6 different queries on. Individually, these queries return the correct amount of records in the tables. Which is 80 records in all tables involved. Then I built a query that collects data from the 6 queries and this query returns 75 records. What am I doing wrong? Thanks Don As a guess, your query is not correctly structured for the data you have. For instance, if one of the 6 tables does not have a matching record that could cause you to "lose" a record or two in the query if you have set up a join to that table and have n...

Static CMap object #2
Hi all, Excuse but the other message is wrong I've declared in my .h file the following CMap type : typedef CMap<CString, CString&, MyClass*, MyClass*&> Map; ... ... class AnotherClass { ... public: static Map BuilderMap; ... ... static void Register(CString name, MyClass* instance); }; In one of my CPP file call the Register method as following: AnotherClass::Register(_T("TEST"), this); The code of Register method is : void AnotherClass::Register(CString name, MyClass* instance) { AnotherClass::BuilderMap.SetAt(name, instance); } When linking my project there t...

keep record and groups in record together
I just posted this but I'm not sure if it actually posted so I am reposting. Sorry if this is twice. I am trying to keep records from splitting, bleeding onto the next page. I don't want each record on one page, but I don't want a record to start on one page and continue on the next page. Any help would be appreciated. Thank you, Debbie Go the section header and right click to get properties. Set force new page to before section, after section, or both depending on what you need. "Debbie S." wrote: > I just posted this but I'm not sure if it actually post...

Chart Object and Worksheet Object
What are the difference? I insert a Excel chart into PPT by Insert>object>create from file>[browse]... It always comes out as a worksheet object whether I get a chart of the data. Whereas, Edit>Paste special method clearly differenciate a chart object from a worksheet object. I know I could convert to either way but any difference? In article <CE92D095-8E17-4AD4-85B9-317AC15A13BF@microsoft.com>, Win wrote: > What are the difference? > > I insert a Excel chart into PPT by Insert>object>create from file>[browse]... As I suggested earlier...

All CRM objects have been updated in one weekend. Not sure how.
I noticed that every Lead, Opp, Account and Contact has a Modified On date of this past Saturday or more recently. The records with Saturday's modified date don't show any particular changes, just the Modified On date and the Modified By user. It's more than a trivial issue. There are business reasons for knowing when things are being updated. Some of these Modified By values are disabled, former users. They were the original creators of the objects. CRM is running on its own server. This SQL Server is also running Veritas Backup Exec. did these users create any work...