link to a record on a form - subforms

I have created a link from one form to a specific record on another using the 
following macro;
Action: Open Form
Where Condition: [ID]=[Forms]![Newspaper Query]![ID]
This works perfect until I try to add the first for as a sub form to my home 
page form. When I click the link it first asks me to 'Enter Parameter Value - 
Forms!Newspaper Query!ID' If I type in the ID it will take me to the 
specified record but this is rather messy.
Am I missing some code with this being changed into a subform?


0
Utf
2/8/2008 12:00:00 PM
access.forms 6864 articles. 2 followers. Follow

2 Replies
1613 Views

Similar Articles

[PageSpeed] 54

Bigbump,
   Not sure if I understand...
   I think you're saying that when your "calling" form was a standalone, the 
Where argument worked, but now... when that same form is a subform, the code 
fails.
   And... if your ID is now on the subform, you should address it as.... 
(use your own object names)
=Forms!frmMainName!frmSubformName.Form!ID
-- 
    hth
    Al Campagna
    Microsoft Access MVP
    http://home.comcast.net/~cccsolutions/index.html

    "Find a job that you love... and you'll never work a day in your life."

"bigbump" <bigbump@discussions.microsoft.com> wrote in message 
news:68600BED-6634-47FB-ABA9-D9EF581208ED@microsoft.com...
>I have created a link from one form to a specific record on another using 
>the
> following macro;
> Action: Open Form
> Where Condition: [ID]=[Forms]![Newspaper Query]![ID]
> This works perfect until I try to add the first for as a sub form to my 
> home
> page form. When I click the link it first asks me to 'Enter Parameter 
> Value -
> Forms!Newspaper Query!ID' If I type in the ID it will take me to the
> specified record but this is rather messy.
> Am I missing some code with this being changed into a subform?
>
> 


0
Al
2/8/2008 1:30:17 PM
That is brilliant, it is working now, thanks for your help.

"Al Campagna" wrote:

> Bigbump,
>    Not sure if I understand...
>    I think you're saying that when your "calling" form was a standalone, the 
> Where argument worked, but now... when that same form is a subform, the code 
> fails.
>    And... if your ID is now on the subform, you should address it as.... 
> (use your own object names)
> =Forms!frmMainName!frmSubformName.Form!ID
> -- 
>     hth
>     Al Campagna
>     Microsoft Access MVP
>     http://home.comcast.net/~cccsolutions/index.html
> 
>     "Find a job that you love... and you'll never work a day in your life."
> 
> "bigbump" <bigbump@discussions.microsoft.com> wrote in message 
> news:68600BED-6634-47FB-ABA9-D9EF581208ED@microsoft.com...
> >I have created a link from one form to a specific record on another using 
> >the
> > following macro;
> > Action: Open Form
> > Where Condition: [ID]=[Forms]![Newspaper Query]![ID]
> > This works perfect until I try to add the first for as a sub form to my 
> > home
> > page form. When I click the link it first asks me to 'Enter Parameter 
> > Value -
> > Forms!Newspaper Query!ID' If I type in the ID it will take me to the
> > specified record but this is rather messy.
> > Am I missing some code with this being changed into a subform?
> >
> > 
> 
> 
> 
0
Utf
2/12/2008 11:32:13 AM
Reply:

Similar Artilces:

linking #4
I am trying to link and .slk file to a .xls file all the links appear to be updating but i keep getting a message that excel cannot update 1 or all of the links. Is this common when linking with an .slk because i have several linked wrk books and have never had this problem. thanks Dean ...

Linked Forms
Hello, I am doing a project that requires two forms.. The first form contains the data for a business the second form contains data for the business owner... How do I link the two forms together...? Many thanks. Bob Send a common key piece of data from the first form (say the company name) to the second form page and include it in the second form as a hidden form field (then if using a database to store the results link with a relationship the 2 results tables by the common field) For form passing information see http://irt.org/articles/js063/index.htm -- ____...

Running a combo box on a continuous form
I have a continuous form bound to a table containing names, addresses and post codes. A combo box, in each record, lists service agents covering the area identified by the associated post code. On GotFocus, the combo box runs a selection query taking the associated post code as the criterion. A requery is necessary to ensure that the list of service agents is refreshed on changing records but that all works fine. Clicking the combo box drop-down arrow for any record confirms that the correct list of service agents is displayed in each case. However, no selection can then be effecte...

Links not linking
Hello I have written a fairly big spreadsheet linking through the pages with SUM, SUMIF and SUMPRODUCT formula's What I am now finding is that when I update one page it doesn't update the rest, even if I am only typing in a figure to the SUM function. I have check and the calculations function is on automatic. is there a fix or something that I could run to make sure that all the formulas are working correctly. thanks Just a guess (since you already checked tools|options|calculation tab). How about selecting all the cells (ctrl-a (twice in xl2003)) and then edit|replace what: ...

Linked Table Manager in ACCESS
Hi, I am trying to change a field in an ACCESS table and get an error message that says the table is a linked table and fields can't be changed. After googling for some answers, I think I should be able to find out the link using "Linked Table Manager" in ACCESS. However, the "Linked Table Manager" button is grayed out. Any ideas/suggestions are welcome. Thanks. Richard Open the table in Design View. Reduce the window so that you can see the window's top bar. Right click in the top bar of the window (usually blue in color) and select ...

Link To A Cell From Chart
Hi all. I have a text box in a chart worksheet. Can I link it to an information from any cell in other worksheet in the same workbook. Thanks. Yes. Click the text box icon, then click on the chart sheet to insert the text box. Click in the formula bar and =Sheet1!A2 (or whatever cell you want to link). -- Greeting from the Gulf Coast! http://myweb.cableone.net/twodays "Salza" <salza@tm.net.my> wrote in message news:3fbfb0bf_2@news.tm.net.my... > Hi all. > I have a text box in a chart worksheet. Can I link it to an information from > any cell in other worksheet in...

links
Dear All, It is very critical for my business to learn the basics and the backbone of links in Excel. Are there any tutorials or articles that gives wealth of information about MS Excel links? (in Excel 9.0.6) Web addresses are also welcome. You can also post to my e-mail above. Thank you in advance. Mustafa .. I would advise you go to the newsgroup "microsoft.public.excel.links", and read everything you can about their troubles there and the solutions......... Vaya con Dios, Chuck, CABGx3 "Mustafa" <anonymous@discussions.microsoft.com> wrote in messag...

Linked Tables Over A LAN
Hi, I have a problem with a PC that is sharing an Access database over a LAN. I'm hoping someone may be able to give me a little advice. By the way, I'm a bit of an amatuer so go easy on the technical terminology ;-). I've got four PCs networked through a router which provides internet access. Two PCs are running XP Pro and two are running Vista Business 32bit. One Vista machine holds my full database while the other PCs have a similar database but with tables linked to the first machine. Been running this setup for several years, on various older PCs, with no problems. My proble...

open continuous form
How can I set continuous form to open showing top of recordset, rather than bottom? Switchboard manager opens to show empty new Add row, even when set to Open in Edit mode. Can scroll up to top, but when open form right from database window in a2003, opens form from top of recordset. thx! On Oct 31, 4:03 pm, nycdon <nyc...@discussions.microsoft.com> wrote: > How can I set continuous form to open showing top of recordset, rather than > bottom? > Switchboard manager opens to show empty new Add row, even when set to Open > in Edit mode. Can scroll up to top, but when open ...

Links
Every time I open a spesific workbook, I get the question if I want t use the old or the new data. This is very irritating! How do I disabl the link that is the reason for this message??? Please help me befor this drives me CRAZY!! ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com Siri You will have a formula somewhere within the wordbook that is linked to another workbook. You can look for them manually and the copy>paste special>values... to kill it. or you could d...

Public Form Classes
We (unfortunately) had an outside source write a utility app. (This is the one using the Telnet session I asked about previously.) The guy wrote a class that wraps the Winsock control utilizing....... "Private WithEvents Socket As MSWinsockLib.Winsock" at the top of the class....I'll call it clsROS. Now here's the question...... There is a login form, and a GUI configuration form. You use the login form, and when successfully logged in, the GUI config forms shows. The login form has a privately dim'd clsROS on it. The GUI form has a public dim'...

email links in Publisher pdf
Why won't Publisher 2007 convert my email links correctly when saved in pdf format? It puts "mail to:" in twice automatically. It is converting website links without a problem. If memory serves the Office 2007 SP1 fixed this in Publisher. The SP2 is also now available. There have been some reports of not being able to open existing Publisher files after installing it, and a report that a fix for that bug is due by the end of the month....you might want to wait to install SP2 until after the first of the month, or just install SP1. DavidF "Rora" <Rora@discu...

User Forms #6
Hello, I have created a user form (click on New Employee). How do I get the information entered in to this form to appear in the correct columns in the Payroll data sheet? And how do I get the combo boxes to display the drop down information from the sheet called input. Regards Runner77 +-------------------------------------------------------------------+ |Filename: payroll.ZIP | |Download: http://www.excelforum.com/attachment.php?postid=4213 | +-------------------------------------------------------------------+ -- Runner77 -------------...

Chart template and links
Hi, I have something "strange " (at least for me) going on ... I have an xls workbook, containing some data sheets and also 3 chart templates. These chart templates are copied via a macro to the output xls with the statement : Sheets(ChartName) _ .Copy Before:=Workbooks(targetfile.Window).Sheets(1) When I now look to this chart template in the output xls I got a link to the original xls workbook in which the macro is running. (I can see that via EDIT>LINKS...) Now I do NOT want that link to the originator xls workbook at all ! Is there anybody who knows how I can co...

Sales recorded in future dates.
In January the RMS customer somehow changed the system date to February. He did not notice that sales in January were recorded in Feb. In February he calls me, the RMS Partner, telling me the system is recording the sales incorrectly and he wants me or Microsoft to give him a new computer. (In a very unpleasant tone) Yelling at me. So I get the proof of what happened. See Microsoft Dynamics Support Incident Number 8810939 : Sales recorded in future dates. I had a thought about this that I want to share with you. I sell a software package, Garagekeeper 2000; it is a DOS based progr...

Linking to ODBC Linked Tables
Hi: I wonder if you have any suggestions for this. We have moved our Access tables into Oracle and have created a MS Access Database that links to these ODBC tables. Each of our users has a local copy of our Reporting Database that formerly linked to Access tables, but now we want them to link to the Ms Access Database which contains the linked ODBC tables on our shared drive. In trying to link to already linked ODBC tables, Access gives an error and will not link to these tables. Is there a way to let our users link to the Access database that contains the linked ODBC tables? Any...

Linked Graphs from Excel
I have linked graphs from excel into my publisher document using Paste Special. The problem is that when they paste in they reshape (I have pie charts and they come in publisher looking like tall skinny ovals). I can fix the shape of the charts manually after pasting them in, but when I update the links the reshaping reverts to its original, incorrect size. Any suggestions on how I can use the linking to excel and not have to resize every time I update? "Paste Special" as what format? Have you tried an image format? -- Mary Sauer MSFT MVP http://office.microsoft.com/ http...

CRM form in Offline mode
Hello, in a form, on the onload event, I would like to know if we are in offline mode ? It's possible ? My javascript call a webapplication and I don't want to run this code in offline mode. Thanks PAF Is possible:- if (crmForm.IsOnline==true) { \\ do something } -- Peter Lynch <pierre-adrien.forestier@supinfo.com> wrote in message news:1154422406.607505.169070@i42g2000cwa.googlegroups.com... > Hello, > > in a form, on the onload event, I would like to know if we are in > offline mode ? It's possible ? > > My javascript call a webapplicatio...

save new record with one form
I created a form to add several pieces of information to a table. I then added a button at the bottom that I thought was suppose to save each record as a NEW recod. The problem is when I click the button it will save it as a new record, but if I close the application and go to add a new record later it automatically pops-up with the latest entry. I then just edit the information in the form and it doesn't save the record as a new entry.... it saves it as the last entry like I was editing. How do either add code so it will always save as a new record or when I open the form it wi...

Find records that belong to a combo box value
I added a combo box to an Excel wks. I need to find all the records on the same worksheet where column B value=ComboBox value. Then I need to copy the records and paste into another worksheet. Is there a way of doing this in Excel? I appreciate any help. Thank you. If this is not what you are looking for, maybe you can adapt it to do what you want. The code below goes into the Sheet code module for the sheet with the combobox. To access the code module, right click the sheet tab and then click View Code on the pop up menu. Copy the code below and paste it into the code windo...

visited links no longer change color
The links still work when clicked but, no longer show purple when visited. This happens in both Outlook and Outlook Express. Yesterday I tried making fonts a little larger as I have eyesight problem. Not sure if this is when the link color problem started. What I did exactly is: *Tools > Options > Mail Format > click "Fonts" button > click "International Fonts" button * At first I went through the list making each one "Larger" font size. * I realized that it's probably only "Western European" I need to change, so all others were set ...

How do i Change links to Relative links for linking pdf files?
Using Publisher, how do i change a link from absolute to relative.. I ahave created an offline website as a demo CD to hand out to clients, but the linked PDF's will only work when the CD drive of the computer is D:, how can i make the link read from the CD no matter whats the drive directory is called?? Please help When you are in the hyperlink dialog do not browse to the file to set the link. Use the address option and enter the path you want. David Bartosik - [MSFT MVP] http://www.publishermvps.com http://www.davidbartosik.com "Riggaz" <Riggaz@discussions.microso...

Sharepoint Linked Table
Hi! I just inherited an Access 2003 database which has a linked table to Sharepoint (dbo_...) without any problem. When you view the actual table from Sharepoint it only has 5 fields, but in Access 2003 have 12 fields. It gets updated without any issue. We are in the process of converting to Access 2007 and the linked table is different from Access 2003. Most of the columns are dropped. Would anyone know how I can keep the same exact column layout (# of columns) as in 2003? This is necessary, because in the code, the linked table updates the local table. Also, we must leave as is, beca...

Cumulative totals on a form
I have a continuous form that I want to calculate the cumulative total for one of my controls. How would I set this up on my form to only calculate the cumulative total for only those records shown on my form? Try a Form header and/ or Form footer..in the textbox's Control Source, enter =Sum(Thefieldof interest) HTH - Bob "Secret Squirrel" wrote: > I have a continuous form that I want to calculate the cumulative total for > one of my controls. How would I set this up on my form to only calculate the > cumulative total for only those records shown on my form? I ...

Jump to random records
I have a form named frmForm1 which is linked to two tables called tblTable1 and tblTable2; tblTable2 is linked to the subform while tblTable1 is linked to the main form. I have a command button on the form, when I click it I would like for it to jump to and/or select one random record from tblTable1 and display it in the main form field in frmForm1 while simultaneously jumping to and/or selecting 3 random records from tblTable2 and displaying them in the subform field in frmForm1. The tables are not linked. Do you know what code would enable me to do this? "Teddy...