Selasa, 24 Mei 2011

Re: [MS_AccessPros] Passing ID from subform to subform

 

The _IsCurrentRec, Fn_IsNewRec, and Fn_IsInTopNRec calls are being made in the conditional formatting in the project, unit list subforms.

With warm regards,

Arthur Lorenzini| SQL Server/Access Developer l alorenzin@live.com
Office: 605-338-0947| Mobile: 605-857-9137 | Fax: 605-338-0947
 
1316 E. 7th Street
Sioux Falls, SD  57103  
SQL Server Development
Database Adminstration Services
Microsoft Access Development  
Grant Writing TA Services
IT Assessment Services
Software Application Training

From: John Viescas <john@viescas.com>
To: MS_Access_Professionals@yahoogroups.com
Sent: Tuesday, May 24, 2011 12:03 PM
Subject: RE: [MS_AccessPros] Passing ID from subform to subform

 
Art-

First, you have nothing set in the Link properties of sfrmImprovementList on sfrmProjectUnit. I tried setting those to txtUnitID and UnitID, but that gets me an error in fn_RecNum, and there's nothing set in txtUnitID. I can't figure out where you call fn_RecNum from - it appears to be called from Fn_IsCurrentRec, Fn_IsNewRec, and Fn_IsInTopNRec, but I don't find a call to any of those functions anywhere else in your code.

Maybe it will get fixed if you set the link properties AND put a value in txtUnitID.

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Art Lorenzini
Sent: Tuesday, May 24, 2011 4:04 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Passing ID from subform to subform

The issue is once you select a unit (when you select off the list the UnitID of the record that you selected gets stored to mlngUnitID) off of the unit list, you will get the command button for unit Improvement will become visible. If you click this button, you should get a list of improvement records for this unitID but it's displaying all improvement records in the table for any unit selected which means, yes its not linked appropriately.

I implemented the following from Duane:

"Art,
I typically have an invisible text box on the main form named "txtProjectID". I set the link master/child of the sfrmUnitList subform to txtProjectID and ProjectID. Then add code to the On Current of the sfrmProjectList to:
Me.Parent.txtProjectID = Me.ProjectID.

This will synchronize the subforms.

Duane Hookom
MS Access MVP"

This worked great between the Project and the unit subform, so I am trying to implement the same process between units and improvements and it not working very well.

With warm regards,
Arthur Lorenzini| SQL Server/Access Developer l alorenzin@live.com
Office: 605-338-0947| Mobile: 605-857-9137 | Fax: 605-338-0947

1316 E. 7th Street
Sioux Falls, SD 57103
SQL Server Development
Database Adminstration Services
Microsoft Access Development
Grant Writing TA Services
IT Assessment Services
Software Application Training
From: John Viescas <john@viescas.com>
To: MS_Access_Professionals@yahoogroups.com
Sent: Tuesday, May 24, 2011 4:06 AM
Subject: RE: [MS_AccessPros] Passing ID from subform to subform

Art-This is almost impossible to follow. First, you have no table relationships defined, so it's tough to see how your data all works together. All the overlaid subforms are crazy-making! (Though it does appear to be a fairly intuitive User Interface!)I followed all your steps below, and I see no problem. Give me an example that demonstrates the problem.John Viescas, authorMicrosoft Office Access 2010 Inside OutMicrosoft Office Access 2007 Inside OutBuilding Microsoft Access ApplicationsMicrosoft Office Access 2003 Inside OutSQL Queries for Mere Mortalshttp://www.viescas.com/(Paris, France)-----Original Message-----From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Art LorenziniSent: Monday, May 23, 2011 11:44 PMTo: MS_Access_Professionals@yahoogroups.comSubject: Re: [MS_AccessPros] Passing ID from subform to subformI also should give you an idea how it worksLoad the databaseAnd then click on
Projects on the Task menuClick on the first project listed in the subform then click Project UnitsClick on the first unit listed and click Unit Improvement.You will see that you will get 3 records because there is only 3 records in the tlbImprovement.With warm regards,Arthur Lorenzini| SQL Server/Access Developer l alorenzin@live.comOffice: 605-338-0947| Mobile: 605-857-9137 | Fax: 605-338-09471316 E. 7th Street Sioux Falls, SD 57103 SQL Server DevelopmentDatabase Adminstration ServicesMicrosoft Access Development Grant Writing TA ServicesIT Assessment ServicesSoftware Application Training From: Art Lorenzini <dbalorenzini@yahoo.com>To: "MS_Access_Professionals@yahoogroups.com" <MS_Access_Professionals@yahoogroups.com>Sent: Monday, May 23, 2011 4:35 PMSubject: Re: [MS_AccessPros] Passing ID from subform to subformI am back on this issue again. This seems to work fine with linking the units to there projects. But I also need to link Units to Unit
Improvement but it keeps giving me a error:I added a txtUnitID to my mainform but it bombs when I try setting the parent child relationship to txtUnitID and UnitID. I think it because it does not exist yet and I am not sure how to get around it.I have uploaded to the Needs Assistanct folder. Please look at and show me what the heck I am doing wrong.With warm regards,Arthur Lorenzini| SQL Server/Access Developer l alorenzin@live.comOffice: 605-338-0947| Mobile: 605-857-9137 | Fax: 605-338-09471316 E. 7th Street Sioux Falls, SD 57103 SQL Server DevelopmentDatabase Adminstration ServicesMicrosoft Access Development Grant Writing TA ServicesIT Assessment ServicesSoftware Application Training From: Duane Hookom <duanehookom@hotmail.com>To: Access Professionals Yahoo Group <ms_access_professionals@yahoogroups.com>Sent: Saturday, May 14, 2011 2:03 PMSubject: RE: [MS_AccessPros] Passing ID from subform to subformArt,I typically have an invisible text box on the
main form named "txtProjectID". I set the link master/child of the sfrmUnitList subform to txtProjectID and ProjectID. Then add code to the On Current of the sfrmProjectList to:Me.Parent.txtProjectID = Me.ProjectID.This will synchronize the subforms.Duane HookomMS Access MVPFrom: dbalorenzini@yahoo.comI have a form called frmProjectUnit. On this form are two subforms called sfrmProjectList (visible=true) and sfrmUnitList (visible = false) respectively.Both of the subforms are continous forms type. On the frmProjectUnits there are multiple command button but the ones I have an issue is with cmdProjectUnits and cmdProjectInfo.The functionality is that the user will select one of the records off of the sfrmProjectList and then click cmdProjectInfor to open the frmProjectDetails for to the correct record based on the selected projectID. This part works. When the user click on the sfrmProjectlist row the ProjectID is moved to a global variable called
mlngProjectID. What I am trying to get to work is once the user click on the specific Project they want and then click the cmdProjectUnits the sfrmUnitList should display with the correctly filtered Units based on the projectID contained in mlngProjectID.I hope that makes sense.Thanks you ArtSioux falls,SD [Non-text portions of this message have been removed][Non-text portions of this message have been removed][Non-text portions of this message have been removed]------------------------------------Yahoo! Groups Links

[Non-text portions of this message have been removed]

------------------------------------

Yahoo! Groups Links

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.


Find useful articles and helpful tips on living with Fibromyalgia. Visit the Fibromyalgia Zone today!

.

__,_._,___

Tidak ada komentar:

Posting Komentar