Error opening subform/form

When i use an access database and open a form containing a subform, the 
subform and its records are loaded before the main form as it should be.

When i use an sql server database and open a form containing a subform, the 
subform and its records are NOT loaded before the main form. 

Can anyone please help me?

Laura
0
Utf
7/5/2007 8:58:01 AM
access.forms 6864 articles. 2 followers. Follow

2 Replies
757 Views

Similar Articles

[PageSpeed] 13

Laura, you cannot alter the way Access fires its events, so you will need to 
learn to work with it.

Typcially when Access opens a form, it fires the subform's Open event before 
the main form's. But that does not mean it loads the *records* of the 
subform before the main form. On a typical form/subform the 
LinkMasterFields/LinkChildFields properties control which records are loaded 
into the subform, based on the value of the LinkMasterFields. It follows 
that Access must load the main form record first (to discover the value of 
the LinkMasterFields) before it can populate the subform with the related 
records.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"laura" <yourdisplayname@discussions.microsoft.com> wrote in message
news:D9FAB1E5-58E7-43FF-ADF2-C916839EED37@microsoft.com...
> When i use an access database and open a form containing a subform, the
> subform and its records are loaded before the main form as it should be.
>
> When i use an sql server database and open a form containing a subform, 
> the
> subform and its records are NOT loaded before the main form.
>
> Can anyone please help me?
>
> Laura 

0
Allen
7/5/2007 11:00:10 AM

"Allen Browne" wrote:

> Laura, you cannot alter the way Access fires its events, so you will need to 
> learn to work with it.
> 
> Typcially when Access opens a form, it fires the subform's Open event before 
> the main form's. But that does not mean it loads the *records* of the 
> subform before the main form. On a typical form/subform the 
> LinkMasterFields/LinkChildFields properties control which records are loaded 
> into the subform, based on the value of the LinkMasterFields. It follows 
> that Access must load the main form record first (to discover the value of 
> the LinkMasterFields) before it can populate the subform with the related 
> records.
> 
> -- 
> Allen Browne - Microsoft MVP.  Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
> 
> "laura" <yourdisplayname@discussions.microsoft.com> wrote in message
> news:D9FAB1E5-58E7-43FF-ADF2-C916839EED37@microsoft.com...
> > When i use an access database and open a form containing a subform, the
> > subform and its records are loaded before the main form as it should be.
> >
> > When i use an sql server database and open a form containing a subform, 
> > the
> > subform and its records are NOT loaded before the main form.
> >
> > Can anyone please help me?
> >
> > Laura 
> 
> 
0
Utf
7/5/2007 11:48:00 AM
Reply:

Similar Artilces:

Validating Data on a Form with a subForm
I have a form with subforms with data validation in the main Form's Before_Update Event. The problem that I am encountering is when the user has not updated all required data but enters the subform the Form Before_Update Event fires and the validation will fail. Is there a way to know what the next object has been selected might be or how I would not perform the Form's validation when the subform has been selected? Any help will be appreciated!!! No. Access saves the main form's record at the point when you move from the main form into the subform. Any record that fails v...

rpc 1719 error
Hi all! Why did this happen? "Apricot" <yilu@21cn.com> wrote in message news:sak732tkm37t126bclp4nugs7d3ah0m1q8@4ax.com... | Hi all! | | Why did this happen? Because you didn't tell us what caused it Sorry, I think this is a generic error, and maybe it's a param feeding error in create binding call. I have tried in this code snippet: void _CRTAPI1 main(int argc, char **argv) { RPC_STATUS status; unsigned char * pszUuid = NULL; unsigned char * pszProtocolSequence = "ncacn_np"; unsigned char * pszNetworkAddress = NULL; ...

Office apps won't open, report Office in use by another use
Version: 2004 Operating System: Mac OS X 10.4 (Tiger) Processor: Intel A few days ago, our Office applications started showing the report that "An Office program is being used by "user." your installation exceeds the number of installations permitted by thelicense agreement. Click More Information to learn about Microsoft Office licensing." But OFFICE ISN'T BEING USED BY ANYONE. All computers have been restarted to no avail. HELP! <sakas@officeformac.com> wrote: > A few days ago, our Office applications started showing the report that > "An Office p...

Please help. Question about querying a subform
I asked this yesterday and see all kinds of questions around me being answered and suppose i just did not word this correctly. I have a table of lab results. It is related to my patient table. It is a one-to-many relationship. I have a date field, which is the date of last labs. I am trying to build a query that will pull only the most previous lab from each patient, with the criteria of it having been more than 6 months ago. I do not want to pull lab dates from 10 months ago, if there is one within the last 6 months. This is for a Dr and it is a priority that I get it d...

Error adding new contact from inside an account
When trying to add a new contact from inside an account the crm server throws an error. I am thinking this is an issue with the account to contact mapping, but when I try to view the relationship mapping under the contact entity the "mapping" option does not appear. -- Jesse Jesse, Please verify your server is fully patched and that you have restarted it. Jeff Loucks 888-474-2237 MVP "jmcelmury" <jmcelmury@discussions.microsoft.com> wrote in message news:57B0A285-21DE-48BD-BF9F-49763E2E56CC@microsoft.com... > When trying to add a new contact from inside...

How to update one form when closing another ?
I have two forms open. frmPeople has the Focus frmAccount does not. frmAccount has subFormPeopleList I add a new person to frmPeople (which is linked to frmAccount) Question 1: When I close frmPeople I want to update frmAccount so the new person shows in subFormPeopleList Quetion 2: But I'm also wondering if I add code to the "close event" for frmPeople to update frmAccount What will this do if frmAccount is not open? Will it add the person twice? I'm guessing not as updating a form doesn't really add data to the table... right? Thanks for any help. Mel Thanks...

smtpsvc error
I keep getting this error : SMTP could not connect to the DNS server '10.5.2.9'. The protocol used was 'UDP'. It may be down or inaccessible. event id 2012. I have looked all over the web for a solution. I have read that is has to to with iis, that is could be my server pointing to an external dns server, etc but have found nothing that can help me. I have checked my dns run netdiag etc no errors. I know udp uses port 53 and ran a utiiity called port query. It tested my connection to see if my mail server is listening on port 53 when I type in the dns servers ip and ...

Two tables, one form
I have a form that I created in AC2003. This form will merge info from two tables. So I assigned Table1 as the source for the form, inserted all of the columns from Table 1. Next, I changed to source for the form to Table2 and again inserted all of the columns from Table2 onto the form. I then changed the name of all Table2 columns to precede it with an "n". i.e. FirstName became nFirstName. All source for those items for Table2 were changed to have no source. Again, the source for the form is Table1. I lookup a row in Table1 in Table2 and if a match is found, ...

Getting a LockMatchID error using sp_rename
When I'm trying to rename a table in the tempdb table, I'm getting an error when I run it in a stored procedure or code, but it works ok on MSSMS. I get the error: Invalid EXECUTE statement using object "Object", method "LockMatchID". EXEC sp_rename 'Tempdb.dbo.oldFile' , 'newFile' Don't ask me why I have to mess with the tempdb files (This is probably the problem). But I have old legacy code that writes to the tempdb database. On Jul 14, 10:00=A0am, Cindy Lee <danparker...@yahoo.com> wrote: > When I'm trying to renam...

Opening Email Program in IE8
When I try to open my email program with the envelope icon on my IE8 toolbar I get the error message: cannot perform this operation because the default email client is not properly installed. This was working fine and suddenly stopped. How can I correct? Always state your full Windows version (e.g., WinXP SP3; Vista SP1; Vista 64-bit SP2; Win7; Win7 64-bit) when posting in a forum or newsgroup. Please do so in your next reply. Also state your default Mail Client (e.g., Outlook Express; Windows Mail; Outlook; Thunderbird; Windows Live Mail; Yahoo Mail). -- ~Robear Dyer (PA...

enter data to different tables through one form
i have 5 tables. all of them has pers_no as primary key. they have one to one relation ship through the primary key amongest them. i want to create one form having a text box pers_no where i will enter the data and i want the data to get entered in each table. so how i am not able to do that. i request all you guys to help me. thank you. Sorry for the bad news, but that's not the right way to use Access. You cannot write to 5 tables from one form like that. If you are subclassing, you could create a form for entering the main form info, and then 5 subforms (probably on tab pages) f...

Error: Hay demasiados formatos de celda diferente.
This is a multi-part message in MIME format. ------=_NextPart_000_0006_01C5C431.45DFE5B0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hola: Me aparece un mensaje de error diciendo " Hay demasiados formatos de = celda diferente." siempre que intento cambiar de formato las celdas. Alguien sabe el motivo Gracias ------=_NextPart_000_0006_01C5C431.45DFE5B0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//E...

Form to search
I have just imported a list of addresses and design a form which is linked and i can add and change the lists via the form. But i would like to be able for so one who uses the database to be able to open it and use the form to also search through the database to find a certain address and amend if needed. Many thanks Niel, Put a button on the Form header and add this code into the Click event: rst.MoveFirst Do Until rst.EOF rst.Edit rst![mCheck] = 0 rst.Update rst.MoveNext Loop rst.Close Set rst = Nothing If you want to alternate from check to unchecked change line, rst!...

PO notes to POP PO Blank Form
There is a TK, 858264, that tells how to add notes to the POP Blank form. Is there a limit to how many notes you can add this way? I have added 14, but when I add the 15th I get an illegal syntax error. Is there a limit to the number of notes I can add? thanks -- Doug Doug, I believe this is a limitation of the PO report itself. We had trouble in the past when trying to link to many tables, or place to much data in the PO report. We would get the same error you are receiving. "Doug" wrote: > There is a TK, 858264, that tells how to add notes to the POP Blank form....

Outlook 2007 Auto open email from known sender
There are a few people in my contact list with whom I need to keep in constant contact. A nice feature would be, for those individuals I trust, to automatically open email on my desktop, or at least to make the auto-notification window persistent. Thanks, Jeff ---------------- 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 Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader a...

ADO Error Attempting to Link Table
Hi, I am attempting to link a table from an user-level security database to an unsecured databaes. The error I get is: Run Time Error -2147467259, Could not find installable ISAM. I have done much searching but I haven't come up with any solutions. Does anyone have any ideas? Thanks! Option Compare Database Dim adoCn As ADODB.Connection Dim adoCat As New ADOX.Catalog Dim adoTbl As New ADOX.Table Private Sub createlink_Click() 'Create Link.. Set adoCat = New ADOX.Catalog Set adoCat.ActiveConnection = adoCn Set adoTbl.ParentCatalog = adoCat adoTbl.Name = "LinkTable" adoTbl...

Outlook 2000 Error 550 Sender verify failed
Hello all We have one machine on our network that cannot send mail for some reason. Everytime this machine attempts to send mail using Outlook 2000 it fails, reporting the following error: "The message could not be sent because one of the recipients was rejected by the server. Server response: '550 Sender verify failed'. (Account: 'Fred', smtp server: 'relay.clara.net', error number: 0x8000ccc79)." It is not a simple matter of setting the authentication on the outgoing mail server, as all the other machines on the network (also using Outlook 2000) do...

How do I get rid of this error?
Outlook 2000 I get an error after Outlook runs for a few minutes.... I ran Office repair, removed Office and reinstalled, formatted the and reinstalled the OS and apps....but I still get the error: OUTLOOK.exe has generated errors and will be closed by Windows. You will need to restart the program. An error log is being generated. First of all, I don't know where the error log is....it must be a windows error log. Any ideas? Thanks. Sorry for the post....there's a kb article on this. "SAC" <sac@sac.com> wrote in message news:uYgXneUPGHA.3260@TK2MSFTNGP11...

Empty sub-form???
Three forms, a parent, "DirectoryItems" and two sub-forms, "FamDirItems" and "PermissionBoxes". When ANY of the controls in "FamDirItems" get the focus, Sub ShiftPB (code below) is called to change the vertical location of the 2nd sub-form and its filter expression. However, the resulting sub-form becomes empty. When I run essentially the identical code in the code-sheet of the sub-form with a series of values, entered via InputBox, as substitutes for Me.FamilyID the form displays according to the value I entered and perfect in every way. Is there som...

Outlook 2003 Bcm Cannot open outlook
Contact Manger has encountered a problem and need to be closed. Event Type:BCM P1:mapi P2: Typeinitializationexception P3: 1.0.2002.1 P4:11.0.8118 P5:nativemsproviderinit P6:msproviderinit P7:D40099TB Is there a fix for this error? Cortexmann wrote: > Contact Manger has encountered a problem and need to be closed. Event > Type:BCM P1:mapi P2: Typeinitializationexception P3: 1.0.2002.1 > P4:11.0.8118 P5:nativemsproviderinit P6:msproviderinit P7:D40099TB > Is there a fix for this error? Any changes to the system between when it worked and when it didn't work,...

Installation Error
I have installed the free trial of Microsoft Money Esssentials and when I open the program I receive the following error: AppName: msmoney.exe AppVer: 16.0.0.705 ModName: utlsrf07.dll ModVer: 16.0.0.705 Offset: 00008fcc What can I do to correct this? Try opening a new file (or the Sample.mny file). Essentials cannot convert from open/convert a file from a previous version. That may be what it's attempting. -Mark "David" <David@discussions.microsoft.com> wrote in message news:7C2F9473-8DC0-45F2-B6BB-EEFD07E4B24E@microsoft.com... >I have installed the free trial...

running macro when workbook is openned
I have the following macro it should run when the workbook is opened. I keep getting an error message. Any ideas. Isthere something that is missing Option Explicit Sub Update() With Sheet5 ActiveSheet.Unprotect Application.EnableEvents = False If UserForm4.CheckBox60.Value = True Then Sheet5.ComboBox3.Visible = True Sheet5.Label5.Visible = True Sheet5.TextBox29.Visible = True Sheet6.ComboBox3.Visible = True Else UserForm4.CheckBox60.Value = False Sheet5.ComboBox3.Visible = False Sheet5.Label5.Visible = False Sheet5.TextBox29.Visible = False Sheet6.ComboBox3.Visible = F...

error in excel help. how to select a cell after clicking the Select All button?
Hello "To see all the relationships on a worksheet, in an empty cell type = (equal sign), and then click the Select All button. Select the cell, and press Trace Precedents twice." is written in Excel 2002 help. It's not possible to "Select the cell" following the procedure. Or How to "select the cell" in the procedure? begin 666 0486.gif M1TE&.#EA%0`4`)$``/___V9XI0```)D`F2'Y! ``````+ `````5`!0```)* MC(^I`>T/GP&BUHBG<'MCIW%-]VF61Z'0A%DE,[:GQU+M@ \T,T-"KFO45)P> @8/AP96"R5TI)6MIBQ$@H]I'P3EEM-UO[KA9D10$`.P`` ` end Ma...

Cannot open database ?
Hi Got a database at work I wrote in 2003, brought a copy home to modify and use here. Now got Access 2007, can load initial form (switchboard) but none of the command buttons work. Can get to design view, all queries and tables run okay. Looked on Tools\User & Group Permissions - Open/Run is the only disabled button on the forms only. All tables, macros etc. all buttons enabled. Access has the Open/Run button disabled. Any idea how I can enable it and run my database please? Thank you Al On Sat, 30 Jan 2010 08:16:01 -0800, Al9315 <Al9315@discussions.microsoft.com>...

Money 2004 Printing/Calculation error
Whenever I attempt to print an invoice the automatically calculated items (customer name, date, prices, tax and total) will not print nor can they be viewed in the preview mode. I have had a MS tech working on the problem for 3 weeks to no avail. Has anyone had erros like these? Any fixes? THANKS!! In microsoft.public.money, KLM wrote: >Whenever I attempt to print an invoice the automatically calculated items >(customer name, date, prices, tax and total) will not print nor can they be >viewed in the preview mode. I have had a MS tech working on the problem for 3 >weeks to ...