f



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 data on
form1, see that the footers are wrong, click the relevant button to go to
form2 to change the footer text and at this point I need to refresh the data
on form 1 at the point where the user clicks to return to form 1.

At the moment, I am simply going back to form 1 from form 2, which means
that the current previewed data is not showing the new footer data.

My initial thoughts were that when the onClick event is fired from my
form2's 'return to form1' button, I do the following:

form1.largetextbox.text = ""
etc..

This would blank out the box to force the user to re-select the invoice no
for a refresh, but I would prefer to auto-execute my sub routine on form1 to
re-do the data extraction, get the latest footers from form2 and then show
it in the large text box.

At the moment, form1.generateinv doesn't work because the app says it can't
find it.  Does this mean that I would have to put the whole routine into a
module to create a global access point to the sub?

Can't I just call it as I leave form2?

Thanks

Mac



0
nospam3689 (18)
5/2/2005 3:31:36 PM
comp.lang.basic.visual.misc 10153 articles. 0 followers. Post Follow

2 Replies
508 Views

Similar Articles

[PageSpeed] 57

The simple answer to this from what I can tell is to simply make the
Sub on form1 a public member of the form. [IE. Public Sub
generateinv()]. This would make the sub accessible from any other form
in the app.
I usually like to try and put any public subs or functions that are
used by multiple forms in a module. In that way, I'm able to keep only
those subs and functions that are required for any given form as part
of that form.

Regards :-)


Macsicarr wrote:
> 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
data on
> form1, see that the footers are wrong, click the relevant button to
go to
> form2 to change the footer text and at this point I need to refresh
the data
> on form 1 at the point where the user clicks to return to form 1.
>
> At the moment, I am simply going back to form 1 from form 2, which
means
> that the current previewed data is not showing the new footer data.
>
> My initial thoughts were that when the onClick event is fired from my
> form2's 'return to form1' button, I do the following:
>
> form1.largetextbox.text = ""
> etc..
>
> This would blank out the box to force the user to re-select the
invoice no
> for a refresh, but I would prefer to auto-execute my sub routine on
form1 to
> re-do the data extraction, get the latest footers from form2 and then
show
> it in the large text box.
>
> At the moment, form1.generateinv doesn't work because the app says it
can't
> find it.  Does this mean that I would have to put the whole routine
into a
> module to create a global access point to the sub?
> 
> Can't I just call it as I leave form2?
> 
> Thanks
> 
> Mac

0
5/2/2005 8:18:27 PM
> The problem is that the user may be previewing the large text box data on
> form1, see that the footers are wrong, click the relevant button to go to
> form2 to change the footer text and at this point I need to refresh the
data
> on form 1 at the point where the user clicks to return to form 1.
>
Form2 raises events when things change.
If you declare a instance of form2's events in form1 then form1 will be
aware
of any changes you make in form2 including any custom events you might throw
in.
HTH




0
5/3/2005 6:25:08 AM
Reply:

Similar Artilces:

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...

How to call a function located in a form module (form open in form view) from an Access Basic global module?
I would like to call a function stored in a form module in Access 2.0 from an Access 2.0 procedure in a global module. Function EmailTheOutletters () in module AppSpecific... .... 560 SSNtext = SelectRandomSSNtext(SSN) .... End Function SelectRandomSSNtext() is the procedure in the form module. I would use the syntax shown in line #560 if I were calling the function from within another procedure inside the form module. Do I have to reference it any differently if calling it from outside the form module? I don't think this is possible with Access 2.0 Solution: Put your function in a global module, and you can access it = from everywhere. --=20 Hope this helps Arno R "MLH" <CRCI@NorthState.net> schreef in bericht = news:53ch519mm1rhbojc8e8sav99t24v5roufm@4ax.com... >I would like to call a function stored in a form module > in Access 2.0 from an Access 2.0 procedure in a global > module. >=20 > Function EmailTheOutletters () in module AppSpecific... > ... > 560 SSNtext =3D SelectRandomSSNtext(SSN) > ... > End Function >=20 > SelectRandomSSNtext() is the procedure in the form module. > I would use the syntax shown in line #560 if I were calling the > function from within another procedure inside the form module. > Do I have to reference it any differently if calling it from outside > the form module? <snip> >I don't think this is possible with Access 2.0 >Solution: Put your function in a glo...

Forms question
Hi folks, I'm new here and am a neophyte Access 2000 user/developer. A year ago, I barely knew what Access was. I was asked by the people that pay us to begin keeping certain data about the children's crisis program I manage. After a couple of years doing this by hand on paper (Yikes!), I decided that this was ridiculous. Out of neccessity, I had to learn Access and develop a database to track clients and services. So what I know, I've learned from places like this and from the many text books I've picked up. I developed the database and entered almost 3 years of data. We average about 30 kids and their families a month, so there are quite a few records at this point. Usual length of stay is about 12 days. So, on to the question: I have a form I've set up, frmIndivClient, that gives information on previous clients including entry_date, exit_date and various details of the case. That works fine. What I want is to have a form that I can enter certain data about a particular client (Client ID, date of birth or Last Name) and upon clicking a button (or whatever) the form, frmIndivClient, will open to the record of that client. I've been messing with it quite a bit and haven't come up with anything really workable. I did put together a query that has [Client_ID #?] in the criteria field of the Client_ID table item. open the form and it asks for the Client_ID to open. do that and it opens to that record. But I want to have a seperate form that there...

calling a subform from another form(not main form)
Hi, I have a MainForm and a SubForm. I also have a popup form that is opened by a button click on the subform. On that form I want to set the main form and subform. to set mainform you do this: dim f as form f = forms("MainForm") ---this works I don't know how to set the subform though... I tried this: dim sf as subform sf = forms("MainForm!Subform") but this does not work... any help appreciated...using Access 2000. Thanks sorry I had a type up there...the code should be to set mainform you do this: dim f as form set f = forms("MainForm") ---this works I don't know how to set the subform though... I tried this: dim sf as subform set sf = forms("MainForm!Subform") but this does not work... any help appreciated...using Access 2000. Thanks ...

Call Function On Main Form to Sub Form
I have a form (frmAppointment) with a subform on it (frmAppointmentsub1). I have placed a command button on the main form which calls the function below from the module. The purpose of this function is to make fields beginning with YY invisble OnClick of the command button on the main form. It works for the fields on the main form but not on the subform. What do I need to add or do to make it work on the subform? Any help would be most appreciated. Thank You TD The command button on the main form event procedure is: Private Sub cmdYY_Click() Dim I As Integer I = glrInvisbleFields(Me) End Sub The module function is: Function glrInvisbleFields(F As Form) Dim I As Integer Dim C As Control Dim X As Variant For I = 0 To F.Count - 1 Set C = F(I) If Left$(C.Name, 2) = "YY" Then C.Visible = False End If Next I End Function this code may help (it assumes that the name of the subform does not start with YY, I have not tested it, but it may work.... Any questions, please ask Function glrInvisbleFields(F As Form) Dim I As Integer Dim C As Control Dim X As Variant Dim Fsub as form Dim Csub as control '---------------------------------------------------- For each C in F If Left$(C.Name, 2) = "YY" Then C.Visible = False else Csub.visible = true If F.DefaultView = 0 Then 'single ...

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. That is my problem : the second time i click on his name, i get a new record!! The first time i made one table with everything in it and it was oke until i began to count and made some calculations. And yes, it must be done in access 97 not in Excel. TX anyway, anyone, anywhere, anyhow, anytime ...

Form, subform, sub-sub form?
Let' say we have an application for a production facility running 24/7 broken into 3 shifts 6-2,2-10,10-6 each production report date contains 3 shifts as above in each shift there can be from one to several different product runs (the average is about 4) but it could be more or less - it's not defined or definite for many reasons Then, for each run there is a production report of product, good pieces, bad pieces total run time for that product etc. etc. then for each run there is a list for # of rejects and reject code SO I have ProductionRuns with rejects subform 1 to many but this results in repeated entries of shift, date, time. So i could make a main table for these and have the production run as a subform to this, but then I have a subform to the prodution run form. This gets confusing and requires me to put buttons for starting new date or shift. Any better way of doing this? Without knowing the structure of your data, it would seem to me that you would have a form with production run as the record... with a selection of Date and Shift in the Form Header. Within that production run, same-level but separate subforms for regular production information and reject information. Using Combo or List Boxes in the header to select date and shift, then replacing the RecordSource with an SQL statement using date and shift as criteria would limit the production runs to that particular date/shift. Or, if you'd rather, use a calendar control to select the ...

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&#...

repost calling a subform from another form(not main form)
Hi, I have a MainForm and a SubForm. I also have a popup form that is opened by a button click on the subform. On that form I want to set the main form and subform. to set mainform you do this: dim f as form set f = forms("MainForm") ---this works I don't know how to set the subform though... I tried this: dim sf as subform set sf = forms("MainForm!Subform") but this does not work... any help appreciated...using Access 2000. Thanks set sf = forms!MainForm.Subform.form If your form name is not a variable It's also faster to refer to the objects explicitly e.g. forms!Myform as opposed to forms("Myform") HTH Pachydermitis I have to use Forms("string") since the subform declaration is a string... Is there anyway I can do what you wrote above "set sf = forms!MainForm.Subform.form" with useing the forms() function...? You should read Keri Hardwick's article about referring to subforms and subform controls etc on access web. www.mvps.org/access - go to Search, type in "Hardwick" and there should only be a handful of articles. You can't miss it. set sf = forms!MainForm.controls("Subform").form HTH Pachydermitis ...

Calling AfterUpdate and OpenArgs in Opening a Form from within another Form
Hi there, I am trying to call the afterupdate event for a combobox in an editing form from the double-click event of a combobox in a first, non-editing form, and get r-t error 2465. Argggg! Private Sub cboClients_DblClick(Cancel As Integer) DoCmd.OpenForm "frmSelectClients", acNormal, , , , , Me.cboClients Forms.frmSelectClients.cboClientsSelect = Forms.frmSelectClients.OpenArgs Call Forms.frmSelectClients.cboClientsSelect_AfterUpdate I am trying to use the open args only if users double-click the combobox in the non-edit form; I have a cmdbutton for Add a new record which opens up the editing form to a new rec. The 2 unbound comboboxes: cboClients, and cboClientsSelect The reason is because I cannot do the openargs in the on open event of the editing form--in order to add new records and have the comboboxes work. Your help would be so greatly appreciated. Thanks, Eric in frmSelectClients, try changing the combo control's AfterUpdate procedure from Private Sub cbo... to Public Sub cbo... hth "Arnold" <ericarnold1@yahoo.com> wrote in message news:1187556978.715547.276790@x35g2000prf.googlegroups.com... > Hi there, > I am trying to call the afterupdate event for a combobox in an editing > form from the double-click event of a combobox in a first, non-editing > form, and get r-t error 2465. Argggg! > > Private Sub cboClients_DblClick(Cancel As Integer) > > DoCmd.OpenForm "frmSelectClients&qu...

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 control named NewData on a subform ctlSubForm contained in the form called OrderForm: Forms!OrderForm.ctlSubForm.Form!Controls.NewData Forms!OrderForm.ctlSubForm!NewData" Why is there a "." character after the name of the main form ? (and the same with a dot after "Controls" property). It's not a method or property ... And if you look at other key-word "Form, Report Properties" there is also an example: intOrderID = Forms!Orders!OrderDetails.Form!OrderID And now - there is a "!" - not "." wich is more logical for me. Why wasn't it this way in the last example ? And one more thing - I don't understand the meaning of property "form" - why to refer to itself ? Can't we refer just this way: Forms!Orders!OrdersDetails!OrderID ??? If we can do that in this way, why to use "form" property ? Than...

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...

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...

from field in form to another form.
What I am looking at doing is I have a couple of forms, when I enter the number of products been despatched on the order form, it then creates a record in the transaction table and also the product history. I have created a couple of update queries which worked well, but did not perform the way that I wanted them to. I wanted to do it using code so that when the despatch order button is pressed it creates the above. The information of the order is in a sub form called Order details on a form called orders., this then wants to create a record in the form transaction history, and another in the product history. I have tried to work on the code but to no avail. sort of looked like this. Forms!transaction history.form![qty required] = forms![order details]. [qty despatched] Were it takes it from the field qty despatched on the order form in the order details sub form and puts it into the form transaction history in the field qty required. I am looking for help on the coding part ie what are the parts made up of i.e. what each part of the code relates to in respect of what it isd doing. Any help much appreciated if you can understand what I am trying to get at. Please Help, A form is just a way of viewing/editing/adding data and doesn't store anything. You can view what you change in one form on any other form, so that if you enter a number in despatched in one form you can view it another form and label it required. You don't want to double enter data. I wo...

Form to Open Another Form
This is very basic, but here goes, from a form, I want to pass parameters to a query to open another form (form by query?). Using a combo box to select a certain field works ok. But I am having trouble passing those fields which are check boxes. Get "data mismatch". The fields in the underlying table are 'yes/no'. ...

Form is link with another form
Macro and button all works fine. It goes to other database and open the form from their. Now only problem is that there are two forms link to each other. When i click on the button it works fine and open that form which i need but there is also a link on that form which open another form. Is it possible that i open the 2nd form which is linked with the first form or any other way Private Sub Command233_Click() On Error GoTo Err_Command233_Click Call Shell("""C:\Program Files\Microsoft Office\Office\MSACCESS.EXE"" ""C:\RDLog.mdb""/XTransOpenForm", 1) Exit_Command233_Click: Exit Sub Err_Command233_Click: MsgBox Err.Description Resume Exit_Command233_Click End Sub * Click Macro (on the left of the screen) * Click New (at the top of the screen) * In the "Action" column scroll down to "OpenForm" * In the options box (lower section of the macro screen) scroll down to the form you want to open. * Just to start with (you can change it later) I would leave the View at "Form" and leave "Fitler" Data" and "Where" all blank. * For the Mode try "Normal" for now. * Save the macro as TransOpenForm Thank You. ...

Lock a Sub-Form from a Form control
** Any assistance you can provide would be greatly appreciated ** I have a main form with multiple sub-forms. On the main form, I have a checkbox that corresponds with each sub-form, and this checkbox will express the users desire to lock the ability to edit a corresponding sub-form. To do this, I figure that each checkbox will have : (1) the AfterUpdate property call a Macro or VB Module to execute the setting of the Allow Edits property of the sub-form and (2) the On Current or On Load property of each corresponding sub-form will also check the value of the checkbox in the main form to determine whether the Allow Edits value for this sub-form should be Yes or No. I have a Macro that sets the value for the sub-form and I have plugged that into the AfterUpdate setting of the checkbox on the main form, but I cannot find a way to insert a step before the SetValue part which can evaluate the state of the checkbox and conditionally set the value of the Allow Edits based on that value. I have also been playing with the Visual Basic Code Editor my feable attempts are also failing. Any help or insight you can provide would be helpful. The VB code I have at the moment (but it is not compiling properly) is: Private Sub Locked_AfterUpdate() If Forms!Form1!Locked = True Then SetValue [Forms]![SubForm1]![Allow Edits] = No Else: SetValue [Forms]![SubForm1]![Allow Edits] = Yes End If End Sub ** If the form element called Locked is checked, then set the form property Allow Edits o...

Forms: Requery a subform from another form
I need to requery a subform from a third form and can't seem to get it to work. frmForm1 has frmAddress as a subform. The button cmdReviseAddress opens the form frmUpdateAddress where all of my validation work is done and the new record is added. However, the new address is not being displayed in the subform. If I use the command Forms![frmTest]![frmAddress].Requery it works fine. The problem is that I want to be able to frmAddress on any form, and need to pass the name of the main form (in this case frmForm1) as a variable. If lsTemp = "frmForm1", the statement Forms![lsTemp]![frmAddress].Requery (and every variation using brackets and quotes that I can think of) fails. Any ideas? Thanks! F. Michael Miller wrote: > I need to requery a subform from a third form and can't seem to get it to > work. > > frmForm1 has frmAddress as a subform. The button cmdReviseAddress opens the > form frmUpdateAddress where all of my validation work is done and the new > record is added. > > However, the new address is not being displayed in the subform. > > If I use the command > Forms![frmTest]![frmAddress].Requery > it works fine. > > The problem is that I want to be able to frmAddress on any form, and need to > pass the name of the main form (in this case frmForm1) as a variable. > > If lsTemp = "frmForm1", the statement > Forms![lsTemp]![frmAddress].Requery (and every variation using ...

Filter Form through sub-form values
I would like to add filter functionality to my database whether through the Main form or the subform. This question may be rudimentary, yet I have not less experience with filtering data outside from queries. Let me just add that Allen Browne excellent article about this subject may not apply to this scenario on an elementary level. (Here's the link to the article; Filter a Form on a Field in a Subform - http://users.bigpond.net.au/abrowne1/ser-28.html) Here's the scenario on my company form with an address subform (one-to-many). A company could have multiple addresses and an address could have many companies. The address subform list addresses in single form view. The main company form has the tblComp as the record source; address subform has a query based record source with trelCompAddr and tblAddr. The address table also holds address data for my project and contact tables. The linking table, trelCompAddress contains phone number and email data. I would like to filter the form (not by query) by area code. Normally, I would create a query with tblComp, trelCompAddr, and tblAddr; and set the phone field criteria to Like 212*. I would like to filter company form with this area code and scroll through the record subset using the Main Form. In addition, the main company form and subform should remain editable at any time. This feat seems more ambition if using the Access Advance Filter dialog. Does it mean using the "On Filter" event to change the main...

How do I set form visible from another form
If I close and reopen the form I lose its changes even if I set acSave to yes when closing. So I'm trying to keep the form open throughout but making it visible only when necessary. So how can I set the visible property from code in the calling form? thanks, --thelma On 11 Jan 2008 18:13:19 GMT, Thelma Roslyn Lubkin wrote: > If I close and reopen the form I lose its changes even if I set acSave > to yes when closing. > > So I'm trying to keep the form open throughout but making it visible > only when necessary. > > So how can I set the visible property from code in the calling form? > > thanks, --thelma Forms!FormName.Visible = false -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail fredg <fgutkind@example.invalid> wrote: : On 11 Jan 2008 18:13:19 GMT, Thelma Roslyn Lubkin wrote: :> If I close and reopen the form I lose its changes even if I set acSave :> to yes when closing. :> :> So I'm trying to keep the form open throughout but making it visible :> only when necessary. :> :> So how can I set the visible property from code in the calling form? :> :> thanks, --thelma : Forms!FormName.Visible = false : -- Then I must have another problem. This hasn't been working for me. The name has no spaces, but it has some capitalization. If I type it with incorrect capi...

Starting subroutine in a form from another form
Hi, Is it possible to start a subroutine in for example (frmMainForm) from another form (frmSubForm)? I want to start a subroutine called cmdButton1_Click. I wrote (in frmSubForm): frmMainForm.cmdButton1_Click But it didn't work. Thanks, Chris "Chris" <c987web@hotmail.com> wrote in message news:ca5b5$407669de$d5498bb6$30992@news.multikabel.nl... > Hi, > > Is it possible to start a subroutine in for example (frmMainForm) from > another form (frmSubForm)? > I want to start a subroutine called cmdButton1_Click. > > I wrote (in frmSubForm): frmMainForm.cmdButton1_Click > But it didn't work. > > Thanks, > > Chris > > Make sure that in frmMainForm the cmdButton1_Click is not marked as "private" but rather public (Sub cmdButton1_Click()) "Raoul Watson" <WatsonR@IntelligenCIA.com> wrote in message news:<Sctdc.15876$1y1.3638@nwrdny03.gnilink.net>... > "Chris" <c987web@hotmail.com> wrote in message > news:ca5b5$407669de$d5498bb6$30992@news.multikabel.nl... > > Hi, > > > > Is it possible to start a subroutine in for example (frmMainForm) from > > another form (frmSubForm)? > > I want to start a subroutine called cmdButton1_Click. > > > > I wrote (in frmSubForm): frmMainForm.cmdButton1_Click > > But it didn't work. > > > > Thanks, > > > > Chris > > > > >...

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 = "tb...

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 the Access VBA Help article "LinkMasterFields Property" for more info. -- MGFoster:::mgf00 <at> earthlink <decimal-point> net Oakland, CA (USA) ...

Updating a form form another table
I have a form that users enter information into. What I want to do is to update certain fields from another table once they have entered a number in a field. The form is already based on a query as this allows the user to see only the records they entered. What would be the best approach to this? TIA, Cyberwolf I'd probably do something like (and this is just an example that you will need to adapt to your needs) ... dim db as database dim rec as recordset dim var1, var2, var3 as variant set db = currentdb set rec = db.openrecordset ("OtherTable") var1 = me.field1 var2 = me.field2 var3 = me.field3 LUpdate = "UPDATE rec" & _ LUpdate = LUpdate & " set [field1] = var1," & _ LUpdate = LUpdate & " [field2] = var2 " & _ LUpdate = LUpdate & " WHERE [field3] = var3 " db.Execute LUpdate, dbFailOnError Cyberwolf wrote: > I have a form that users enter information into. What I want to do is > to update certain fields from another table once they have entered a > number in a field. The form is already based on a query as this allows > the user to see only the records they entered. What would be the best > approach to this? > > TIA, > > Cyberwolf On 4 Jan 2007 12:10:58 -0800, "ManningFan" <manningfan@gmail.com> wrote: >I'd probably do something like (and this is just an example that you >will need to adapt to your needs) ....

Web resources about - calling a form sub from another form - comp.lang.basic.visual.misc

Calling Dr. Death - Wikipedia, the free encyclopedia
Calling Dr. Death (1943) is the first of the Universal Pictures Inner Sanctum mystery films . The "Inner Sanctum" franchise originated with a ...

List of country calling codes - Wikipedia, the free encyclopedia
This is a list of country calling codes defined by ITU-T recommendations E.123 and E.164 , also called IDD ( International Direct Dialling ) ...

Messenger For Android Update Includes Free Calling For Canadian Users
... internet protocol) and voice features. This time, Facebook’s latest update to the Messenger application for Android includes free calling for ...

Facebook Video Calling - Facebook
Bring your conversations to life on Facebook. With face-to-face video calling, now you can watch your friends smile, wink and LOL. To get started, ...

Facebook’s Talktime program in India pays new mobile users in calling credit
... Facebook has launched its Talktime program in India which gives every new user who signs up with a mobile device 50 Rupees (almost $1) in calling ...

Berlin Calling (@neuraum) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Calling all foodies: Here comes @TwitterFood
There are many thousands of food-related Tweets people send on Twitter each day – Tweets about meals, ingredients, favorites, recipes and dining ...

Rounds Video Calling + Chat for iPhone 4, iPhone 4S, iPhone 5, iPhone 5c, iPhone 5s, iPad 2 Wi-Fi, iPad ...
Get Rounds Video Calling + Chat on the App Store. See screenshots and ratings, and read customer reviews.


AT&T now officially supports Wi-Fi Calling for international travels
AT&T is currently sending out text messages letting eligible customers know that they may use Wi-Fi Calling when traveling abroad. Users on iOS ...

Resources last updated: 3/24/2016 10:10:09 PM