f



focus from main form to sub form

Hi,
I have a combobox who's values change the recordsource of the form.
Within this form, there is a subform, whos records also need to change
pending the value in the combobox.  I am able to get the main forms
values to change, but not the subform.  I've only been using Access 97
for about a month now, so it might be fairly simple.  Here is my code:

Private Sub combo1_Change()
    If Me.combo1.Value = "Standard Procedures" Then
         Me.RecordSource = "tbl_stdProc"
    ElseIf Me.combo1.Value = "Policy" Then
        Me.RecordSource = "tbl_policy"
    ElseIf Me.combo1.Value = "Process Description" Then
        Me.RecordSource = "tbl_ProcDesc"
    ElseIf Me.combo1.Value = "Program Description" Then
        Me.RecordSource = "tbl_ProgDesc"
    ElseIf Me.combo1.Value = "Training Program" Then
        Me.RecordSource = "tbl_TrainProg"
    ElseIf Me.combo1.Value = "Qualification" Then
        Me.RecordSource = "tbl_Qual"
    ElseIf Me.combo1.Value = "Standard / Specification" Then
        Me.RecordSource = "tbl_StdSpec"
    End If
' Everything up to this point works fine. The problem starts below

    Me![frm_Type_sub].SetFocus
    If Me.combo1.Value = "Standard Procedures" Then
         Me.RecordSource = "tbl_stdProc_sub"
    ElseIf Me.combo1.Value = "Policy" Then
        Me.RecordSource = "tbl_policy_sub"
    ElseIf Me.combo1.Value = "Process Description" Then
        Me.RecordSource = "tbl_ProcDesc_sub"
    ElseIf Me.combo1.Value = "Program Description" Then
        Me.RecordSource = "tbl_ProgDesc_sub"
    ElseIf Me.combo1.Value = "Training Program" Then
        Me.RecordSource = "tbl_TrainProg_sub"
    ElseIf Me.combo1.Value = "Qualification" Then
        Me.RecordSource = "tbl_Qual_sub"
    ElseIf Me.combo1.Value = "Standard / Specification" Then
        Me.RecordSource = "tbl_StdSpec_sub"
    End If
End Sub

>From searching the archives, it seems like I need to set the focus to
the form on one line, then to the object on another, but I'm not sure
how to do so.
So to sum up my problem: Using a combobox in a form, how do I change
the subforms recordsource?

Thanks in advance!
Stuart K

0
kardiansr (8)
8/2/2005 8:52:21 PM
comp.databases.ms-access 42670 articles. 0 followers. Post Follow

4 Replies
609 Views

Similar Articles

[PageSpeed] 15

Stu wrote:

> Hi,
> I have a combobox who's values change the recordsource of the form.
> Within this form, there is a subform, whos records also need to change
> pending the value in the combobox.  I am able to get the main forms
> values to change, but not the subform.  I've only been using Access 97
> for about a month now, so it might be fairly simple.  Here is my code:
> 
> Private Sub combo1_Change()
>     If Me.combo1.Value = "Standard Procedures" Then
>          Me.RecordSource = "tbl_stdProc"
>     ElseIf Me.combo1.Value = "Policy" Then
>         Me.RecordSource = "tbl_policy"
>     ElseIf Me.combo1.Value = "Process Description" Then
>         Me.RecordSource = "tbl_ProcDesc"
>     ElseIf Me.combo1.Value = "Program Description" Then
>         Me.RecordSource = "tbl_ProgDesc"
>     ElseIf Me.combo1.Value = "Training Program" Then
>         Me.RecordSource = "tbl_TrainProg"
>     ElseIf Me.combo1.Value = "Qualification" Then
>         Me.RecordSource = "tbl_Qual"
>     ElseIf Me.combo1.Value = "Standard / Specification" Then
>         Me.RecordSource = "tbl_StdSpec"
>     End If
> ' Everything up to this point works fine. The problem starts below
> 
>     Me![frm_Type_sub].SetFocus
>     If Me.combo1.Value = "Standard Procedures" Then
>          Me.RecordSource = "tbl_stdProc_sub"
>     ElseIf Me.combo1.Value = "Policy" Then
>         Me.RecordSource = "tbl_policy_sub"
>     ElseIf Me.combo1.Value = "Process Description" Then
>         Me.RecordSource = "tbl_ProcDesc_sub"
>     ElseIf Me.combo1.Value = "Program Description" Then
>         Me.RecordSource = "tbl_ProgDesc_sub"
>     ElseIf Me.combo1.Value = "Training Program" Then
>         Me.RecordSource = "tbl_TrainProg_sub"
>     ElseIf Me.combo1.Value = "Qualification" Then
>         Me.RecordSource = "tbl_Qual_sub"
>     ElseIf Me.combo1.Value = "Standard / Specification" Then
>         Me.RecordSource = "tbl_StdSpec_sub"
>     End If
> End Sub
> 
>>From searching the archives, it seems like I need to set the focus to
> the form on one line, then to the object on another, but I'm not sure
> how to do so.
> So to sum up my problem: Using a combobox in a form, how do I change
> the subforms recordsource?

 From the MainForm you could enter
      'Me![frm_Type_sub].SetFocus  no need for this
      If Me.combo1.Value = "Standard Procedures" Then
	Forms!MainForm!SubForm.Form.Recordsource = "tbl_stdProc_sub"
      elseif Me.combo1.Value = "Policy" Then
	  Me("SubFormName").Form.Recordsource = "tbl_policy_sub"
      ..........

That's 2 ways to reference the subform.  You might need to requery the 
subform.


> 
> Thanks in advance!
> Stuart K
> 
0
oil (4047)
8/3/2005 7:28:36 AM
I changed my code to your suggestion, but I get the following message:

If Me.combo1.Value = "Standard Procedures" Then
     Me("frm_Type_sub").Form.RecordSource = "tbl_StdProc_sub"   ' **

and

If Me.combo1.Value = "Standard Procedures" Then
     Forms!frm_Type!frm_Type_sub.Form.RecordSource = "tbl_stdProc_sub"
 ' **

but on both I got the message:
Runtime error 2465
MS Access can't find the field 'tbl_Type_sub' referred to in your
expression. ( on line ** )

I also tried the following code:
If Me.combo1.Value = "Standard Procedures" Then
     Me.frm_Type_sub.FormRecordSource = "tbl_StdProc_sub"  ' **

Error Message:
Compile error: method or data member not found.  (refers to line **)

any suggestions? I double checked to make sure the form names were
correct, and that the code matches.  On the first two codes, it gave
the error of not finding field 'frm_Type_sub' but it should be finding
a form, not a field.

thanks!

0
kardiansr (8)
8/3/2005 1:08:25 PM
Stu wrote:

> I changed my code to your suggestion, but I get the following message:
> 
> If Me.combo1.Value = "Standard Procedures" Then
>      Me("frm_Type_sub").Form.RecordSource = "tbl_StdProc_sub"   ' **
> 
> and
> 
> If Me.combo1.Value = "Standard Procedures" Then
>      Forms!frm_Type!frm_Type_sub.Form.RecordSource = "tbl_stdProc_sub"
>  ' **
> 
> but on both I got the message:
> Runtime error 2465
> MS Access can't find the field 'tbl_Type_sub' referred to in your
> expression. ( on line ** )
> 
> I also tried the following code:
> If Me.combo1.Value = "Standard Procedures" Then
>      Me.frm_Type_sub.FormRecordSource = "tbl_StdProc_sub"  ' **
> 
> Error Message:
> Compile error: method or data member not found.  (refers to line **)
> 
> any suggestions? I double checked to make sure the form names were
> correct, and that the code matches.  On the first two codes, it gave
> the error of not finding field 'frm_Type_sub' but it should be finding
> a form, not a field.
> 
> thanks!
> 
Do all of the tables have the same field names?  Lets say Table1 has ID, 
Descriptiuon and table2 has ID, Desc.  You built the form on Table1 
(description).  So what is Desc in Table2 in the form?

Your could use queries perhaps. In the above example, you could have a 
query something like
	Select ID, Desc as Description From Table2
Now there is a Description column.  You'd use the query there.
0
oil (4047)
8/3/2005 4:20:30 PM
Stu wrote:
> Hi,
> I have a combobox who's values change the recordsource of the form.
> Within this form, there is a subform, whos records also need to change
> pending the value in the combobox.  I am able to get the main forms
> values to change, but not the subform.  I've only been using Access 97
> for about a month now, so it might be fairly simple.  Here is my code:

Maybe I missed something in your post but a record change in the main form would be 
reflected in the subform if there is proper linkage between them in the properties of the 
SubFormControl - the control on the main form that "holds" the (subform) form.

That's one of the powers of subforms.

As for setting focus from the main to the sub I've found its usually a two-step process.
Set focus to the subform control on the main form and then to a control within the form 
contained in the subform control:

  Me!sfrmCtrl1.SetFocus
  Me!sfrmCtrl1.Form!controlNameHereFromSubForm.SetFocus

-- 
'---------------
'John Mishefske
'---------------
0
8/5/2005 4:56:10 AM
Reply:

Similar Artilces:

Query By Form Using Same Sub Form and Main Form
Having problems displaying query results from combo boxes on a sub form, which is on the same form that is used to select criteria. This has always worked form me when displaying query results on another main and sub form. The requery on the sub form and refresh comands on the main form do not work when the form is first displayed and when the selection criteria is changed. Should I be doing a refresh and then repaint of the sub form. > ' Creates saved query in the database container for the sub form Call BuildSql("") ' The following commented line correctly displays query results on a seperate sub form that has the results from the criteria selected on the form currently in use. 'Docmd.OpenForm "MainFormSeachResults ' The following two lines attempt to display the results on a sub form which is on the same form where the criteria is selected: Me.frmSubFormResults.Requery Me.Refresh < Hi Tom, I often use an unbound main form to collect criteria, then show the results in a datasheet-style subform. I create the SQL string using code, and then use that string as the Recordsource for the subform directly (no need to save it as as query in the the database container) As an added bonus, the subform refreshes automatically ... no need to "Refresh" or "Repaint" anything. Here's some sample code to illustrate: - lstFieldNames is a listbox containing field names ... which is one of the choices in the listbox&#...

Sub-forms of Sub-forms
I'm creating a data-entry form for 3 tables. There is a one-to-many relationship between table1 and table2 and a 2nd one-to-many between table2 and table3. What I would like to do is have the user select from a combo box on the main form a record from Table1. That would filter the subform on the main form to just the records from Table2 with the PK from Table1. I've got everything working fine up to this point, but am a bit confused on where to go next. I need a mechanism for the user to pick one of the records from Table2, and be presented with an entry for for all records in Table3 that have the selected PK from Table2. I've tried putting a 2nd subform on my main form, but am having trouble getting them to link together. Something else I tried, is putting a command button on each row of Table2's subform in continuous forms view to open up a seperate form for Table3. Try setting the Default view of the 2nd and 3rd subform to datasheet view. SY Greetings, Here is something I came up with that should do what you are asking: Do the Link Master/Child thing with the mainform and subform1. Subform1 will need to be in Datasheet view for this trick to work. The 2nd subform - which will also be placed on the mainform (and also needs to be in datasheet view) will have its recordsource be based on a query of the table for that subform (a query for table3). You will use a parameter in the criteria field of the query for the link field between table2 and...

Hiding Access Main Form/tables/queries/forms/etc
Thank you in advance for any and all assistance. Is there a way to hide the Main Access window with tables, queries, forms etc programmatically? Michael On Sat, 17 Jan 2004 17:17:16 -0600, "PMBragg" <pmbragg@megavision.com> wrote: >Thank you in advance for any and all assistance. > >Is there a way to hide the Main Access window with tables, queries, forms >etc programmatically? > Yes. Take a look here for some API code that will manipulate the Access window. http://www.mvps.org/access/api/api0019.htm - Jim Another way, with probably less control than the...

Display recordcount of a sub form in a main form
Hi All, I am using A2 for this database. I have a main form with bound fields of FlightNumber and FlightDate I also have a subform. This subform takes details of a passanger along with other details. I also have a textbox called status in subform. When a passanger's details are entered, status value is set to "confirmed", when passanger calls in to reconfirm flight, status value changes to "Reconfirmed", and when passanger calls in to cancell his/hres flight, status value is set to "cancelled". Sometimes, status textbox may also have a value of "Wait...

Problem with Totals on Sub Forms and Main Forms
I have an access data project (MS-SQL Svr 2000 backend and MS-Access 2003 Front End) that has a sub-form based on a query view. On the sub form I have several column's in which I have a running total on the sub-form footer. This part works fine. My problem is that the main form, on which the sub-form resides, I want to display the total from the sub-form total calculation. I have tried referencing the control on the sub form, i.e. My.Somecontrol = Forms![formname].[controlname] but this does not work. How do you make this works. Do I have to do something different because this is an access project instead of an mdb? Thanks in advance for any help!! Mike m charney at dunlap hospital dot org Mike: The following KB article may be a good reference. http://support.microsoft.com/default.aspx?scid=kb;en-us;209099 -- David Lloyd MCSD .NET http://LemingtonConsulting.com This response is supplied "as is" without any representations or warranties. "Mike" <noway@forgetit.com> wrote in message news:kwO7f.3351$Kv.274@newssvr22.news.prodigy.net... I have an access data project (MS-SQL Svr 2000 backend and MS-Access 2003 Front End) that has a sub-form based on a query view. On the sub form I have several column's in which I have a running total on the sub-form footer. This part works fine. My problem is that the main form, on which the sub-form resides, I want to display the total from the sub-form total calculation. I have tried refer...

Form
I have a table TBL_NAMES : IDNAME , Name_person , ETC..... (15 different labels) I have a second table TBL_POINTS : IDPOINTS , LINKNAME_PERSON , POINTS_ALGEBRA , POINTS_GYM , etc.... (25 courses) I have made a form where all the names are listed and when i click on a name another form is opened with that persons name on top and a number of labels and textboxes where i put those points in. So far no problem. BUT... i want one record per person. So the next time i click on his name i would like to see those points and be able to change them but i must not be able to create a new record. T...

Mulitple Main Forms Created by Sub Form Entries
Hi I'm hoping this is a problem just because I'm a beginner at Access, and so someone can help I have created a database of companies, with a subform for contacts. (seperate tables) It worked perfectly until I got more than one contact for a company! If I add a 2nd contact to the subform, when I go back into the database, Ive got 2 records of the main form for the company, with the subform, showing. Its not adding a second record to the company table, that just says I have 2 contacts attached, which is what I want. How do I stop the record, when I view the form , duplicating its...

Limit Sub Form records based on Main Form
I have an option group called Issue_Type on my main form F1_Member_Demographics_Main. When I select one of the 3 options on the main form from the option group Issue_Type I want to limit the sub form F2_Member_Issues records based on the combo box Issue_Code_T1. Option Group Issue_Type on main form: 1=Complaint 2=Grievance 3=Appeal Combo Box on sub form: 1=Complaint 2=Grievance 3=Appeal So if I select Complaint from the option group on the main form I only want to see Complaints on the sub form etc. Thanks in Advance Gary BEETHOVEN wrote: > I have an option group called Issue_Type on my main form > F1_Member_Demographics_Main. When I select one of the 3 options on the > main form from the option group Issue_Type I want to limit the sub > form F2_Member_Issues records based on the combo box Issue_Code_T1. > > Option Group Issue_Type on main form: > 1=Complaint > 2=Grievance > 3=Appeal > > Combo Box on sub form: > 1=Complaint > 2=Grievance > 3=Appeal > > So if I select Complaint from the option group on the main form I only > want to see Complaints on the sub form etc. > > Thanks in Advance > Gary Forms!MainFormName!SubFormName.Form.Filter = _ "Issue_Type = " & Me.Issue_Type Forms!MainFormName!SubFormName.Form.Filter = True Salad wrote: > BEETHOVEN wrote: > >> I have an option group called Issue_Type on my main form >> F1_Member_Demographics_Main. When I select one of the 3...

Main Form / Sub Form search issues with combo boxes
Hello- I have a main form "Customers", with two sub forms "Items" & "Transactions"= .. The forms are all linked through the key fields of ShipDate & AccountNum. T= ransactions form is linked to Customers, and Items is linked to Transaction= s. The account number combo box in the header of the Customer form functions f= ine. I have combo boxes on the headers of the subforms that work when used = on the subform alone, but when used as a part of the Customers form, they w= ill not work correctly. The Transactions subform has an Invoice # combo box= , and the Items subform has a Sequence # combo box. I cant get the records in all 3 forms to display the intended record when u= sing the subform search boxes. The VBA for the controls is shown below. Customer Form (Main) Private Sub cboFindAccount_AfterUpdate() ' Find the record that matches the control. Dim rs As Object Set rs =3D Me.Recordset.Clone rs.FindFirst "[AccountNum] =3D " & Str(Me![cboFindAccount]) Me.Bookmark =3D rs.Bookmark End Sub For the Transaction subform Private Sub cboFindInvoice_AfterUpdate() ' Find the record that matches the control. Dim rs As Object Set rs =3D Me.Recordset.Clone rs.FindFirst "[InvoiceNum] =3D " & Str(Me![cboFindInvoice]) Me.Bookmark =3D rs.Bookmark End Sub For the Items subform Private Sub cboFindSequence_AfterUpdate() ' Fi...

Making MS Access Form as a standalone form like in VB
Well, its sames difficult for me; I love access so much and wish to make it perform extra task. I prepared an HTML form but can not connect it to my access table and so I think it is possible to make an access form a standalone form for user input. Can anyone assist. My mail add is dianafather@aim.com. *** Sent via Developersdex http://www.developersdex.com *** Oscar, why don't you just code up a VB form for user input and connect it to an Access backend? To my knowledge, you can't force an Access form to exist outside of Access. Your users would have to open the Access file to enter data, no matter how you set up the Access form. On Tue, 20 Dec 2005 11:35:09 GMT, Oscar N. Goyee <dianafather@aim.com> wrote: It's poor newsgroup practice to ask for email responses. Unlike what Steve said, you can create a form that lives outside of the Access main window: make it a popup. There is also nifty code out there (google for it), that puts the Access main window behind that popup, and moves it with it when it moves. To the end user it appears you have a single-form application. -Tom. >Well, its sames difficult for me; I love access so much and wish to make >it perform extra task. I prepared an HTML form but can not connect it to >my access table and so I think it is possible to make an access form a >standalone form for user input. Can anyone assist. My mail add is >dianafather@aim.com. > > > >*** Sent via Developersdex http://ww...

Forms/Subforms in MS Access Database
Why do my Forms/Subforms in my MS Access Database not appear? All I see is the boxes where they should show?! What did I do wrong? Thanks, John zufie wrote: > Why do my Forms/Subforms in my MS Access Database not appear? > > All I see is the boxes where they should show?! > > What did I do wrong? -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Probably there isn't a name of a form in the sub-form's Source Object property. Also, the Link Child Fields and the Link Master Fields properties may be blank - you must enter the names of the link fields, they hold the field names that link the data between the forms. -- MGFoster:::mgf00 <at> earthlink <decimal-point> net Oakland, CA (USA) ** Respond only to this newsgroup. I DO NOT respond to emails ** -----BEGIN PGP SIGNATURE----- Version: PGP for Personal Privacy 5.0 Charset: noconv iQA/AwUBSSsUjoechKqOuFEgEQL+dQCfYUSwXFtPj0RRSZO+q3J8lQCD0/UAniRz JKu0h9AG0BAg8W3wC/0BC7B3 =Kvva -----END PGP SIGNATURE----- On Nov 24, 2:54=A0pm, MGFoster <m...@privacy.com> wrote: > zufie wrote: > > Why do my Forms/Subforms in my MS Access Database not appear? > > > All I see is the boxes where they should show?! > > > What did I do wrong? > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Probably there isn't a name of a form in the sub-form's Source Object > property. =A0Also, the Link Child Fields and the Link Master Fields > properties...

Forms and Form
Hi everyone ! 1) An example from help: "Each Form object has a Controls collection, which contains all controls on the form. You can refer to a control on a form either by implicitly or explicitly referring to the Controls collection. Your code will be faster if you refer to the Controls collection implicitly. The following examples show two of the ways you might refer to a control named NewData on the form called OrderForm: ' Implicit reference. Forms!OrderForm!NewData ' Explicit reference. Forms!OrderForm.Controls!NewData The next two examples show how you might refer to a ...

Accessing data from one form from main form in Visual Basic 6
How do I extract data from a form into the main form for processing? For instance, I have several image files in a form called images(images.frm), indexed from 0 to 99, and I want to import these into a variable array in my main form, main (form1.frm). How do I code a control to get these images into an array in my main form from the images.frm? TIA JC wrote: > How do I extract data from a form into the main form for > processing? For instance, I have several image files in a > form called images(images.frm), indexed from 0 to 99, and > I want to import these into a variable...

Form size question with Access forms, remote desktop, and MS Surface Pro
Hi, I know this is a stretch to ask this question, but: We have an Access 2010 application hosted using Remote Desktop. When we access forms from the desktop they look like they should. And from an iPad. However, a client is using their Surface Pro the forms are so tiny that she can't use them when accessing our application "on the cloud". Otherwise, they look fine on a Surface Pro when running it off the cloud. Does anyone have an idea? I do not think there is anything that the people that are hosting our software can do. -paulw On Monday, 29 February 2016 17:30:11 UTC, PW wrote: > Hi, > > I know this is a stretch to ask this question, but: > > We have an Access 2010 application hosted using Remote Desktop. When > we access forms from the desktop they look like they should. And from > an iPad. However, a client is using their Surface Pro the forms are > so tiny that she can't use them when accessing our application "on the > cloud". Otherwise, they look fine on a Surface Pro when running it > off the cloud. > > Does anyone have an idea? I do not think there is anything that the > people that are hosting our software can do. > > -paulw It will cost you, but have a look at a program called "ShrinkerStrether from Peter's Software (http://www.peterssoftware.com/ss.htm) This should shrink or stretch forms and all their controls to match the scr...

form access to form excel
Hello, How may I pass in VBA a value from a control in a access 2003 form to a control in a excel 2003 form ? I try this but it does'nt run: (oApp=word.application) oApp.Forms("saisie").tbnom.Value = Form_Form1.tbnom.Value & " " & Form_Form1.tbprenom.Value Thanks. ...

Continuous Forms with sub-form
I have a need to create a form containing schedule detail with a sub-form containing a crosstab of date detail. I would like to display it as a continuous form so the user can see related schedules together with the dates. Is there a way to get Access to do this? It won't allow continuous forms with sub-forms. Filling unbound controls on the main form only show the current record's date information. I would prefer not to use a big un-normalized temp table. On Wednesday, December 18, 2013 7:10:34 AM UTC-6, Ron Paii wrote: > I have a need to create a form containing schedule detail with a sub-form > > containing a crosstab of date detail. I would like to display it as a > > continuous form so the user can see related schedules together with the > > dates. Is there a way to get Access to do this? It won't allow continuous > > forms with sub-forms. Filling unbound controls on the main form only show > > the current record's date information. I would prefer not to use a big > > un-normalized temp table. Use a datasheet? Ron Paii wrote: > I have a need to create a form containing schedule detail with a > sub-form containing a crosstab of date detail. I would like to > display it as a continuous form so the user can see related schedules > together with the dates. Is there a way to get Access to do this? It > won't allow continuous forms with sub-forms. Fil...

MS Access: Force Form with Datasheet To Keep Focus When User Navigates Away -Stumped-
Ok. What I want to do is: Call up form2 from a button on form1. Form2 is a datasheet. I don't want the user to be able to lose focus of this form2 until the traditionally close it with the 'x' button. Form2 must be sizeable. It doesn't seem (haven't found a way) to make a Datasheet Sizeable Form be Modal and stay on top of all other windows until the user closes the form by the 'x' button on the form. Only other choice I have is to try to catch when the user tries to take focus away from the form by clicking another area in access other than form2. The Form2's 'On Lost Focus' Event refuses to fire due to the nature of how Access works (I've read). This is because there are other controls on the form2 that could have focus. SO... I went to each of the controls (3 of them) on form2 and set their 'On Lost Focus' Events. I just need to figure out the right code to stick in those Events in order to return (forcefully) the user back to the form2 that should keep the focus until the 'x' button is pressed. Any suggestions? cc77lemon@gmail.com wrote: > Ok. > > What I want to do is: > > Call up form2 from a button on form1. Form2 is a datasheet. I don't > want the user to be able to lose focus of this form2 until the > traditionally close it with the 'x' button. Form2 must be sizeable. > > It doesn't seem (haven't found a way) to make a Datasheet Sizeable > Fo...

Access Form --> Hyperlink to Excel --> Return to Original Access Form ?
I have an Access 2000 form that has a Hyperlink that opens an Excel 2000 worksheet located in the same network folder as the Access MDB. The Hyperlink works great. When users close the Excel File, they must choose the correct open Access form on the Windows Desktop Taskbar to return to the Access form that had the Hyperlink. Is there a way to: 1. Open the Access Form 2. Launch the Hyperlink to the Excel Workbook 3. Exit Excel, then 4. Return to the original Access form automatically - without clicking anything (such as the the TaskBar) I just need help with #4. Or, is there a better way to do this? Thanks John John wrote: > I have an Access 2000 form that has a Hyperlink that opens an Excel > 2000 worksheet located in the same network folder as the Access MDB. > > The Hyperlink works great. > > When users close the Excel File, they must choose the correct open > Access form on the Windows Desktop Taskbar to return to the Access form > that had the Hyperlink. > > Is there a way to: > > 1. Open the Access Form > 2. Launch the Hyperlink to the Excel Workbook > 3. Exit Excel, then > 4. Return to the original Access form automatically - without clicking > anything (such as the the TaskBar) > > I just need help with #4. > > Or, is there a better way to do this? > > Thanks > John > See if the code at http://www.mvps.org/access/api/api0018.htm works better. Thanks for the response. I wi...

calling a form sub from another form
Hi All This might sound simple, but I'm stumped. In essence I have a 2 form app that connects to an SQL db and extracts info from it. This works fine. The problem is with my 2nd form. The 'run through' is that the user can select an inv no from a combo box on form1 and when they select one, I auto-extract info from a db relating to this inv no, concat the various data fields with 2 other text fields (contains footer info) that are on form 2 and present it in a large text box on form 1. This also works fine. The problem is that the user may be previewing the large text box da...

Link Pop up Form to main form
I have a main form and use a combo box to open a pop up form. The combo box lists customers and only one customer requires the fields that are found on the pop up form. I can get the form to pop up however I do not know how to link the pop up form data to the main form record. On Oct 16, 6:54 am, CJONES <craig...@hotmail.com> wrote: > I have a main form and use a combo box to open a pop up form. The > combo box lists customers and only one customer requires the fields > that are found on the pop up form. > > I can get the form to pop up however I do not know how to link the pop > up form data to the main form record. What else does the combo box do? Does it select a record for editing, the majority of whose fields reside on the main form? If that is the case, then you could set the rowsource of the popup form to the rowsource of the main form. Store the rowsource of the main form to a string variable and pass it in the openargs to the popup form. In the pop-up forms' form_load event, assign it to the popup forms' rowsource. On Oct 16, 11:22 am, OldPro <rrossk...@sbcglobal.net> wrote: > On Oct 16, 6:54 am, CJONES <craig...@hotmail.com> wrote: > > > I have a main form and use a combo box to open a pop up form. The > > combo box lists customers and only one customer requires the fields > > that are found on the pop up form. > > > I can get the form to pop up however I do not know how to link t...

Focus mysteriously shifting from form to form
I asked this on microsoft.public.access, but got no answers. Maybe I was too verbose ... or there is no answer. User opens form A and then form B While typing in form B, focus jumps to last active control on form A User curses at development staff This has also been observed to happen while the user was not touching the mouse or keyboard. It only happens with Access applications. Focus never jumps to Excel or from Outlook to Word. Only in Access. The application has no timers and the text box into which the user is typing has no code behind any of its events. Any ideas? Is it another SP2 thing? -- Danny J. Lesandrini dlesandrini@hotmail.com http://amazecreations.com/datafast I have never seen this in any version of Access. I'd love to see it but I suppose it's not the kind of thing one could create in a small zippable mdb. There is something causing it, of course. But what? Is it just one machine? I'd start by "purifying" the mdb by creating a new one with SaveAsText 6,"", FileName and then exporting/importing everything with SaveAsText/LoadFromText Out of left field, is the video board ok on this machine? I ask because the only thing remotely the same, (mysteriously munged fonts) that I have seen. I traced to (I know it's unbelievable) incomapatbility between a TOP 1 clause in a Query and a specific ATI Board.... No Really! We removed the TOP 1 clause and the fonts straightened up ... two twin Dells 400 miles ap...

Populate key from form to sub-form
I'm trying to figure out how to bring the key field from a parent form to populate the corresponding field in the sub-form during data entry, or to filter sub-form records during data viewing and updating. Can anyone help me? Bob Bob Mikels wrote: > I'm trying to figure out how to bring the key field from a parent form to > populate the corresponding field in the sub-form during data entry, or to > filter sub-form records during data viewing and updating. > > Can anyone help me? Use the subform's Link Master Fields & Link Child Fields properties. See...

Linking Pop up form to Main form
I have a main form with a combo box where if a specific customer is selected a popup form opens and additional information required for this customer is entered into the form. Data from the main form and popup form is stored in the same table. I have a field called certification that I would like to use to link the forms. Greetings, what you need to do is to open the popup form in dialog mode (which is probably already the case). In the popup form you need to add a public property (Get) and assign it the desired value. Note: a form is just a class module except that it has a graphical user interface (GUI - the GUI thing happens way under the hood for Access). In the popup you can create a public property anywhere in the Form's code module (not a standard module or standalone class module). In my sample I am setting a Certification property to a Long datatype. If your Certification is a string, then set the property to String '--code for popup form Public Property Get Certification() As Long Certification = CLng(txtCertification.value) End Property Private Sub cmdOK_Click() Me.Visible = False End Sub In the popup form here I have a textbox called txtCertification. A user enters information here then clicks an OK button (cmdOK) which only hides (Me.Visible = False) the form (don't unload the form - it has to be running so that you can read the value from its property). In the calling form you would call the popup like this: '--code for ma...

How to connect MS Access form to MS SQL Server
Hello all I created an application which use MS Access 2000 as user interface and MS SQL Server 2000 as backend. If I want to get data from MS SQL Sever 2000 and display them on the MS Access 2000 form, where do I set the database connection to the form (i.e. tell the form to get data from MS SQL server database)? Thanks Bon In Windows control panel, admin tools, data sources (ODBC), create a system DSN of type SQL server and fill in the parameters for your SQL database. In Access, select file / get external data, files of type ODBC. Select machine data source, select the DSN you created and the table(s) you need. ...

Web resources about - focus from main form to sub form - comp.databases.ms-access

Focus Pomodoro Timer – A New Approach to Focus on Your Tasks
My thanks to Focus for sponsoring The Loop’s RSS feed this week. Focus is a beautiful and easy to use pomodoro timer. Built exclusively for iOS ...

FOCUS Information Agency
Kabul. Two earthquakes destroyed dozens of mud homes in Afghanistan's mountainous Hindu Kush region on Monday, killing at least three people ...

FOCUS TAIWAN
CNA - Español - フォーカス台湾 - Mobile english japanese español TAIPEI CITY Temperature:22-25°C Rainfall rate :70% NEW TAIPEI CITY Temperature:22-25°C ...

Ford Focus (third generation) - Wikipedia, the free encyclopedia
1.0 L EcoBoost I3 1.6 L Duratec Ti-VCT I4 1.6 L EcoBoost I4 2.0 L Duratec Ti-VCT I4 GDI (Not available in Europe, except Russia: only engine ...

Prime Minister Malcolm Turnbull looks to focus on city building program
... got too far ahead of itself, in what has ultimately amounted to a non-debate on tax. But it could recover its economic credentials with a focus ...

Samsung Galaxy S7/S7 Edge Feature Focus – Touchwiz
Samsung's TouchWiz has long been met with mixed reception, with some users feeling its added features make it a welcome addition, and others ...

Pro Football Focus: Cardinals win the Chandler Jones deal
According to Pro Football Focus, Arizona general manager Steve Keim has worked a masterful deal in acquiring Chandler Jones from the New England ...

Fed presidents, oil in focus on data-light day
With options expiring and a sparse economic calendar Friday, traders will watch to see if oil and stocks can hold their gains of the week.

The Latest: Civil rights the focus of Congress members trip
COLUMBIA, S.C. (AP) — The Latest on a group of Congress members touring South Carolina to learn about the civil rights movement in the state ...

Pwn2Own contest highlights renewed hacker focus on kernel issues
Hackers demonstrated 21 new vulnerabilities in attacks against browsers and operating systems during this year's Pwn2Own hacking contest. The ...

Resources last updated: 3/21/2016 8:20:16 AM