Opening A Form From A SubForm

Nov 8, 2006

I have a sub-form in a form that displays data that relates to the data in the single form. What I would like to do is double click on that record in the form which then opens a form that displays more of same data in the sub-form. I have created the double click action that opens a form, but shows all the data and not the specific information relating to the record that is selected in the orginal form.

Look forward to any advices

View Replies


ADVERTISEMENT

Opening A Form Inside A Subform Area

May 4, 2006

I have a form (eg. frmMain) with a subform (eg. frmSub).

The subform is going to be a query which displays results based on criteria defined in the main form.

So say frmMain had a field called 'OrderDate'. When they typed an order date, all the orders on that date appear in the subform.

The way I have it set up at the moment is that the query criteria is like [forms]![frmMain]![orderdate]

Do this means that once the order date is entered - there is still no results in the subform because the query has already run when the form was opened and, as this field was then blank, no results were returned.

I would like to keep this setup, but - instead of having the subform set to the query, it would be set to another form which just has a commond button.

The user will then input the OrderDate - click the button (which is in the subform) and the query will run. This can be done easily. HOWEVER, is there a way for the query results to be displayed in that subform area after the button has been clicked instead of opening up a new form.

I know in web design you can target links to frames, so wondered if this was possible?

View 1 Replies View Related

Set Values In Subform When Opening Main Form

Apr 16, 2007

Hello,
I'd like to know how to set values to a subform when opening a main form
I have a quotation form called FQuotation with a subform on it.
This subform is the link between the products and quotation it is called SFProdQuote and has the fields: refproduct, quantity, quote and PQTotal.
Once I have filled the info on the main form i pick the products on the subform using a combo box on the refproduct field, input the quantity and give it a quote.
All this works fine it calculates quantity x quote = total.

My issue is I'd like to create a quotation form that opens with a set of products already selected in the subform. let say 10 of them, since my quotations always start with the same 10 products or so. I do not want the users to have to select over and over the same things.

Is it possible to open a form with set values selected in the combox of its subform?

Thanks for your help

View 1 Replies View Related

Forms :: Opening Form To New Record In Subform

May 20, 2013

I have a form with a subform. Every time I open the form I want it to open to a new record in the subform (but not necessarily a new record in the main form; that will depend on some other stuff that I've already taken care of).I found a way to do that using the following VBA in the main form:

Private Sub Form_Current()
Me.EventSubform.SetFocus
DoCmd.GoToRecord , , acNewRec
End Sub

It works great, but it causes Access to automatically scroll down to the start of the subform, blocking the view of information in the main form that the user needs to see. I've tried adding a line to Form_Current() to reset the focus to the main form but it doesn't seem to work.

View 5 Replies View Related

Opening Popup Form With Current Subform Record

Sep 7, 2005

Hello,

I am trying to run a macro on doubleclick in a subform (dataview) that will open the same record in a popup form (tabular).

I've enter in the macro Where Condition the following statement to only show the record I doubleclicked on in the popup. The only problem is it's asking me for a parameter value for the LogID. Its apparently not picking up the LogID I doubleclicked on. Is there any way I can fine-tune this WHere statement so that it knows the record LogID I clicked on. (The pop up form should show only the same record).

[LogID]=[Forms]![CommunicationLog Subform]![LogID]

View 1 Replies View Related

Forms :: Opening Form To A Specific Record From Subform

Jan 28, 2014

I have a form that displays details for a specific asset and a continuous subform that lists all the purchases for that asset. I have the following code in the On Click event for one of the fields in the subform:

Dim myOrder As Integer
myOrder = Me.txtOrder
DoCmd.OpenForm "frmOrders", acNormal, , "OrderID=" & Order, acFormEdit, , "Edit"

The problem is, when I click on any item in the subform, the code returns the value of the first item in the form rather than the one clicked on. If I open the subform on its own (outside the main form) then the code works fine. I can't figure out why it won't work in a subform.

View 6 Replies View Related

Combo Box Filter In Subform Showing Blank At Form Opening

Feb 26, 2015

In the Purchase Order details form a Supplier has to be chosen via a combo box. Based on that another combo box in the subform displays products only from this supplier (Products table is linked to supplier table).

I managed to let the subform combo show only relevant products using criteria referring to the main form combo box. Also other product data will show accordingly in text boxes. So far so good.

However when I close the form and reopen it the subform combo box is blank, other text boxes still show the right values. If I remove the filter criteria for the subform combo then all fields show all data correctly. (However the combo box is unfiltered again 8-/)

So somehow the 'criteria' prevents the combo to show the value that was previously chosen.

View 2 Replies View Related

Forms :: Main Form Opening Subform In Add Mode But One Field Is Already Filled

Jul 20, 2015

I'm using Access 2007. I have a few problems:

1. I have a switchboard. I want to click a button, that opens a form with a dropdown list, when I make my selection, it opens a subform in add mode, but the linked field in the subform isn't empty, but filled with the mainform's field value that I selected?

OR

2. Is there a way for me to open a form in add mode, add data to it, click the add button (I will add an add button) that allows me to add again, but this time a particular field is not empty, but filled with selected info from previous selection?

Say for instance, I have 2 fields (both combo box fields), I click add, made selections for both fields, I click add again, but this time one of the fields stays constant like it's already been selected. It's filled with what was selected from before.

Either of those 2 - which ever is simpler.

View 4 Replies View Related

Forms :: Closing Opening Form With Timer Then Opening Main Menu

Apr 7, 2014

I have a Form opening from Access Options. I would like to close this Form using the Timer. The following is the code I have used but it is not working.

Private Sub Cover_Page_Form_Load()
OpenTimer = Timer
End Sub
Private Sub Cover_Page_Form_Timer()
If (Timer - OpenTime) = 5 Then DoCmd.Close acForm, "Cover_Page_Form", acSaveYes
End Sub

Next question. If I can get this to work can I then use a DoCmd to open new Form within the code above or do I need a new process.

View 5 Replies View Related

Error When Opening SubForm!!

Apr 18, 2007

hello,

I have a subform which opens good with Access 2003 but now that I updated to Access 2007, it won't open. It gives me a "type mismatch in expression" error. Why does this happen??

thank you.

View 2 Replies View Related

Forms :: Which Tab Is Subform Opening In

Jun 23, 2014

I have a tab control with 8 tabs, one for each hour in a shift. There is a subform on each tab. Some of the subforms are re-used since they are identical to each other (there is a 1,5 form, a 3,7 form and a 2,4,6,8, form). I'm looking for a way for the subform to know which tab it is in when it opens. I have some code that I need to run differently depending on which tab the subform is opening in. in other words, on the 3,7 form I have code that I want to run if it is in the Hour 3 tab during hour 3 but not if it is in the Hour 7 tab.

Everything I've tried seems to run into the same problem, since subforms actually load first, it can't see which tab it is on. If the user clicks another tab, it thinks it's still in the previous tab and the wrong code runs. I may have to resort to creating duplicate forms for each hour just to accomodate this. That will increase the form count to 8 from 3 and duplicate effort when making changes.

View 14 Replies View Related

Opening Subform At The Last Record?

Nov 9, 2011

I have a main from named RequestChecks with two list boxes on it named ListDateii and ListDateiii .Also , there are two subfroms named OperatingAccountII and Operating AccountIII. tHE list boxes have master-child bound relation to the subforms .If user scroll ListDateii and highlight the date , the subfrom shows the resord associated with this date . And the same with ListDateiii. If it is possible, when a user opens the main form RequestChecks, the list boxes show only the date of the last record and consequently the subrofms show the last record.

I put the below code in main form load events

ListDtaeii.SetFocus
ListDtaeii.ListIndex = List0.ListCount - 1
ListDtaeii.Selected(List0.ListCount - 1) = False
ListDtaeiii.SetFocus
ListDtaeiii.ListIndex = List0.ListCount - 1
ListDtaeiii.Selected(List0.ListCount - 1) = False

It doesn't work.

Seond my attemp -I put the code in form current

Private Sub Form_Current()
Dim rs As Recordset
Set rs = OperatingAccountII.Form.RecordsetClone
If rs.RecordCount Then
rs.MoveLast
MySubForm.Form.Bookmark = rs.Bookmark
End If

And doesn't work neither.

View 1 Replies View Related

Opening Subform Based On A Certain Condition

Jan 24, 2006

I have 2 combo boxes which I select a 'Year' and an 'Incident'. Based on 'incident', a listbox lists whether it was a 'bad' or 'good' incident.

I only want my subform to pull up the record if the listbox says 'bad'. how do I do that?

View 3 Replies View Related

Opening A Subform Based On Criteria From A Combo Box

Sep 30, 2004

The posting in archive t-31918 was very helpful and almost does the trick. I have a subform with gifttype that has only giftID and gifttype. There are four different gift types and I need a subform to open in a specific location, as a subform. The code given by the archive (my version):

Private Sub Gifttype_AfterUpdate()
If Me.[Gifttype] = "restricted/unrestricted" Then
DoCmd.OpenForm "frmgift1"
ElseIf Me.[Gifttype] = "planned gift" Then
DoCmd.OpenForm "frmplannedgift"
End If
...

Opens what I want as subform as a regular form.

How can I get the correct subform to populate a certain area on the master form?

Thank you!
Pat Wright

View 1 Replies View Related

Forms :: Opening Subform After Entering New Record

Feb 17, 2014

What is the best way to open a linked subform using a button while in a newly created record?

I thought a simple

Code:

docmd.save

command would do (either in the "current record" or the "after update" event)

View 4 Replies View Related

Forms :: Opening A Form From Another Form Via Combo And Auto Loading Form Data?

Apr 14, 2015

I have been tasked with creating a tool to analyse mobile phone bill data and present the analysis, and our recommendation, to a customers. Being new to Access (other than basic tuition) this has been a slow uphill task, which is finally nearing completion, however there is a problem which I have not yet been able to overcome.

The requirement is for the DB to open first on a splash screen (lets call it Form A) with fancy picture where our customer is selected from a combo box, the customer is then telephoned, a linked computer screen is established and our staff then click "Go" to proceed to a second form (Form B) showing an account overview and more details.

The problem I have is when "Go" is clicked, the second form loads via on click event, and even populates the correct customer in its combo box. Unfortunately that is as far as it gets - the combo does not look up the information. The customer needs to be selected again for the subforms and subreports to load with the customer overview. To clarify, form B just sits there blank until the customer is re-selcted from the combo box in form B.

View 9 Replies View Related

Forms :: Access 2010 - Opening New Form And Closing Current Form?

Mar 14, 2013

I am using Access 2010 - Version 14.0.61.29.5000 (32-bit)

I am building a custom Export Wizard to export data to Excel using the Report Wizard for the basic ideas.

All I am trying to do is have a [Back] button on a form to open another form and close the current form.

Private Sub cmdBack_Click()
DoCmd.OpenForm "frm_ExportWizardPage2", , , , , , Nz(Me.OpenArgs)
DoCmd.Close acForm, "frm_ExportWizardPage3"
End Sub

The new form is opening but then the current form is not closing. All forms are the same size, shape and positioned centrally although this should not make any difference.

Could this be anything to do with which form has the focus when I open the new form?

View 2 Replies View Related

General :: Clear Sub Form At The Time Of Opening The Main Form?

Jul 24, 2013

I have a form, which is comprised of a sub form, and some of the text box controls sided with a button, and the event had been written to the button.

Now, to give a note on how had the sub form had been created is firstly taking a clone of the "Payments" table and using it as a datasheet, and then create a sub form in the form, it works fine

View 2 Replies View Related

Opening A Form Based On The Same Table As The Calling Form

May 22, 2006

Hi All

I have a form based on a table called tblListMaster and I want to allow users to open up another form showing all the members of one of the entries in that table so I have added a button called 'Show List Members'.

The list members form which I then want to bring up is also based on tblListMembers (it's a master-detail form). When I hit the button to open up the list members form I get an error message saying that the table is already opened exclusively.

I can understand why I get that message so I thought I would be cunning and create a dummy form which I open up, passing in my list id in the openargs (at that point I also close the original form) and then from that dummy form automatically open up the master detail form and close the dummy.

Code in List Master form

Private Sub cmdListMembers_Click()
' open up the list members form

DoCmd.OpenForm "frmDummy", acNormal, , , , , Me.ListId
DoCmd.Close


End Sub

Code in Form Load of dummy form

Private Sub Form_Load()

DoCmd.OpenForm "frmMaintainListMembers", acNormal, , , , acWindowNormal, Me.OpenArgs
DoCmd.Close


End Sub

Sadly I still get the same error message - does any one have any ideas what I'm doing wrong?


Gordon

View 4 Replies View Related

Forms :: Opening A Form By Clicking A Field From Another Form

Jul 18, 2013

I'm creating a database to track new policies request. I have a form in datasheet view that displays a list for all Initial Review and Draft status. I would like to click (... or maybe double click) on the Policy Name field that will display all fields into single form that is link to PolicyID ... to update any info needed. In other words i want to click on that record to be display in actual form.

Private Sub PolicyName_Click()
Dim stDoc As String
Dim stWhere As String
Dim strsql As String
Dim DB As DAO.Database

[code]....

View 1 Replies View Related

Opening Form To View Latest Form

Mar 12, 2008

Form: entryform

Fields:
RecordDate
Department
DepartmentNumber
7 text fields
6 memo


What I am looking to do is be able to click on a combo box for departments so that once a department is selected, the latest record for that department is populated in the form, however, it is opened as a NEW record so that when any changes are made to the information in the form to the text or memo fields, it is saved as a new record.

I'm having a lot of trouble with this.
Thank you very much in advance for your help.

View 7 Replies View Related

Opening A New Form From A Form Using Command Button

Aug 11, 2006

:rolleyes: Hi this is my first time using this forum, I hope someone can help.
I have a form 1 and I want to open another form to display data specific to the record showing in form 1.

I have done this many times successfully but now I am getting an error msg "The sepcified field '[UnitID]' could refer to more than one table listed in the FROM clause of your SQL statement.

I have tried everything but cannot solve this one. Any suggestions?

:)

View 4 Replies View Related

Cmd FormOpen Locks Form When Opening New Form

Mar 31, 2008

I built an info application for a friend in business. Its based on a kiosk style menu with selections, and when a button is clicked it executes "FormOpen" and brings up a second form with the results in it.

Its important for this application that they are two seperate forms which display the results, lets call them form1 and form2 for this exercise.

My problem is that when form1 opens form2, it LOCKS form1. And if you are to try and select a list menu, or click a button on form1, when form2 is concurrently open, it 'beeps' with no function. Whether it be by .disabled or whether its some sort of record lock (to stop a person from editing in two places at once), I'm not sure.

Basically, form1 never needs to have records updated, its the kiosk remember ie. form1 serves as a menu. But when form2 is open i would prefer it if they could could still click buttons on form1 to execute filters for the query i have on form2.

I've tried fidding around with the .disabled property on form1, and then i also thought about the record lock and tried DISABLING data entry on the first form so perhaps access could work around. Nothing has worked. There is also nothing in the book that i have on access.

Please help!!! You will be much loved. Even if you just tell me its not possible then i can sleep easy.

Kind Regards

Jeremy

View 3 Replies View Related

General :: Opening A Form From A Form In Different Database

Aug 31, 2012

Is there a way to open a form from a form in a different database? I'm pretty sure it needs to be done in VBA and have seen some code floating around that suggests it can be done, but I'm thinking there's more to it, like maybe one or both of the DB's need to be in a different format?

View 9 Replies View Related

Opening Forms Directly (instead Of Opening MS ACCESS)

Apr 20, 2006

Hi All,

Is there a way that when the user clicks on a database file, the form pops up without opening MS Access window.

Thx,

Jatz

View 1 Replies View Related

Opening Forms Directly (instead Of Opening MS ACCESS First)

Apr 20, 2006

Hi All,

Is there a way that when the user clicks on a database file, the form pops up without opening MS Access window.

Thx,

Jatz

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved