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 Replies


ADVERTISEMENT

Forms :: Contacts Database - Error Entering New Record On A Subform

Jul 31, 2014

I am having a problem with my Contacts Database. I have attached it for your review.

My main form entitled "frmContact", is a form to enter a new contact. I have a Notes subform, and I want to be able to enter multiple notes for one person. I have a note for John Doe, and tried to enter a new note for him and got this error message:

"The LinkMasterFields property setting has produced this error: 'The object doesn't contain the Automation object 'tblcontact"."

Why is it doing this? I tihnk I have the relationships correct, and everything...

View 13 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

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

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

Forms :: Highlight Unbound Subform Record That Matches Other Subform Record

Jan 22, 2014

I have two unbound unlinked subforms residing on a 3rd unbound main form. When I enter the current record on Subform1 I would like the matching record(s) on Subform2 to be highlighted or otherwise formatted. I can get this to work for only the first record on subform2 due to the way I have my code setup on Subform1:

Code:
Private Sub Accounting_Unit_Enter()
'find where AUs match. only works for first Subform2 record
If Me.[Accounting Unit] = Forms!MainForm.[Subform2]!AccountingUnit Then
msgbox "Match"
End If
End Sub

My thought was that I needed to reference the Recordset of Subform2 and search for all AccountingUnits that match the current AccountingUnit of Subform1,

View 6 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

Opening Forms (that Is Related To Same Record)

Feb 1, 2006

I have 3 forms.

I open the very first one (main form). From there, I wrote a little VBA in the 'Add Record' button that if a certain checkbox in that form wasn't checked when I click 'Add Record', it would open up the 2nd form.

The problem is, when I open up the 2nd form and enter info, the info is all put into a new record.

I want the 2nd form's info to go into the same record as the main form. It's all related.

How do I do that?

Note:I built the 2nd and 3rd form from queries that had parameter querying in them...the parameters are frmo the main form.

View 14 Replies View Related

Forms :: Opening A Form At A Particular Record In Set

Feb 8, 2015

I have a table with a schedule of tasks that are required weekly for the next year. Each record has Monday's date as the Scheduled_Date" for the task. From my main form, I have a command button to open a form linked to the table, so that amendments can be added to the table for each record (i.e. - If a task is complete/incomplete/progressing etc. the user marks it so.

What I would like to do is have the form open at the task scheduled for the current week, based on the "Scheduled_Date" value. Whilst I can do this with a simple filter, I would like the form to open with all records available to the user so that they can go forwards/backwards as they wish, but the first record they see when the form opens is the one specific to this weeks date.

View 4 Replies View Related

Opening Forms Blank Ready For Add Record

Dec 30, 2004

I was reading some other posts and someone said they got their Forms to Open ready to accept data, just curious how to go about this...

View 4 Replies View Related

Opening Forms And Unwanted Record Advancing..help..please!

Apr 3, 2007

Hi all,

Ok, this is a seemingly VERY simple problem gone haywire!

I have a very simple database that gathers data from 50 questions. It stores these in fields as numbers (1 - 10). no problem.

However, I've had to split the questions over 3 forms and this is where the problem begins. When I reach the end of the first lot and I click the button to open the next form, it jumps to the next record. So, on Form 1 we were on record 5 and then form 2 continues as record 6 (form 3 would be record 7).

All I want is for them all to appear in the same record.

Any hints as to what im' obviously doing wrong?

Many thanks!

View 12 Replies View Related

Opening Forms Blank Ready For Add Record

Feb 4, 2008

mmm the problem i get is that if i set data entry to yes it hides all my records :s any reason why this would happen? im using access 2000 btw.

View 5 Replies View Related

Forms :: Opening Form To A Specific Record

May 8, 2015

I've done this dozen's of time - but it doesn't seem to be working now. I have a continuous form (frmHome) where i want a user to be able to click on a record, and be able to open up that specific record in "frmCustomer". The key field here is pkCustomerID (i have it in the query).

frmHome is run off a query ("qryCustomer").

frmCustomer has "tblCustomer" as the source.

The code i've used on a button on "frmHome" is:

DoCmd.OpenForm "frmCustomer", , , "[pkCustomerID]=" & Me!pkCustomerID

It always only open Record #1.

View 7 Replies View Related

Forms :: Opening Report To Specific Record?

Feb 11, 2014

I can open a report right with a wherecondition that opens a report based on an agent name..

DoCmd.OpenReport "SelectPSReport", acViewPreview, , "[PS_Agent]='" & Me.CboAgt & "'"

But it returns every record for that agent and I want to be able to specify the date that goes with the name.

For example Tom has a record for Feb 10, Jan 10, and Dec 13. I only want to see the record for Dec 13.

I am able to see this in my form by having a combo box for the agent and the date (the date box being based on the agent box). So now how can I add a condition to include the date combo box?

DoCmd.OpenReport "SelectPSReport", acViewPreview, , "[PS_Agent]='" & Me.CboAgt & "' And [PS_dDate]='" & Me.Cbodt & "'"

Adding the condition gives me and type mismatch error, which I think may come down to the date combo box on the form having 3 columns (only 1 is visible).

View 12 Replies View Related

Forms :: Forms With SubForms Opening With New Record?

Mar 8, 2013

I have a main form with multiple subforms in tab view, right now the forms only open in edit mode, I would like all forms to open to new record mode. I know I can set the main form with the switchboard manager but what about the subforms?

View 2 Replies View Related

Forms :: Split Database - Opening Related Record On Different Form

Aug 11, 2014

I have a split DB that is in its (hopefully) finally stages of development. Using Access 2010. It is being developed both at work and at home on a 64 bit machine. The remainder of the machines are 32 bit.

All of a sudden one of my most basic sets of code doesn't want to work, but only on my machine at work. It works fine on my home computer and on other computers at work. It is the simplest of codes, run from frmNameA:

DoCmd.OpenForm "frmNameB", acNormal, , "[SequenceNumber] = " & Me![SequenceNumber], acFormEdit, acWindowNorm

The desired sequence of events is to open frmNameA, find the active clients and then click on the [SequenceNumber] to bring up the related record on frmNameB.

When I do this on my computer at work, it asks for the query criteria for the [SequenceNumber] and the criteria for another field. On the home computer and others at work, it works just fine.

In a related problem, I have the following code on the OnLoad event for frmNameB. It opens all the related records for active clients that are in frmNameB. But if there are no related records, it is supposed to cancel the event. Again, it works fine on my home computer and others at work, but not my work computer.

Private Sub Form_Open(Cancel As Integer)
'code when opened from frmNameA and no record exists in frmNameB
Dim MyReply
If ClientID = "" Or IsNull(ClientID) Then
MyReply = MsgBox("No record exits in frmNameB, Do You Want to Exit?", vbOKOnly)
If MyReply = vbOK Then
DoCmd.RunCommand acCmdUndo
DoCmd.Close acForm, "frmNameB", acSaveNo
End If
End If
End Sub

What I can't figure out is why this may be happening, where I might look for errors, and what I might do to correct this.

View 9 Replies View Related

Forms :: Opening Form With Inappropriate Record Source Query

Jul 28, 2013

I am setting up a generic form template that will enable me to maintain data in a standardised way. All generic code is stored in a module. There is very little code specific to the table being maintained. Much of the form functionality is determined by data held in supporting tables therefore data driven.

When a form is loaded a commonly named query is created that is used as the Record Source of the form. This query only ever returns one record and uses the value of textbox on the form as criteria in the unique id field.

Despite immediately creating the query in the Open event of the form, Access tries to process the form first and returns an error as the Record Source query applies to another form, the one last opened.

How can I create the query before anything on the form is referenced / processed without creating it before the form is opened?

View 3 Replies View Related

Forms :: Selecting Record In Parent Subform From Child Continuous Subform

Jan 26, 2014

I have two subforms on a main form. Both use similar queries and nearly the same set of records and PK. The first subform is for data entry and the 2nd subform is a continuous form that lists the entries in order that are made from the 1st Subform. (for entering in vacation days and appointments)

The continuous form cannot be edited, it is to be a list for viewing the information only.

I have an edit button next to each record on the continuous form. When the button is clicked, I want it to take the 1st subform to that specific record as well (same PK), so the information can be edited there.

I cannot figure out how to get the 1st subform to go to the record on the continuous form when the button next to that record is clicked on the continuous form.

I tried the DoCmdSearch for record and just keep getting object is not open errors.

View 2 Replies View Related

Forms :: Opening A Form Based On Multiple Tables On A Specific Record

Dec 31, 2014

I have a form "frm_PatientNew" based on table "tbl_patients", this form contains a button "cmd_NewVisit" which is supposed to do the following: opens the form "frm_NewVisit" for recording a new visit for the last recorded patient in "tbl_Patients", I found many approaches depending on DMax and Dlookup and they worked fine just if "frm_NewVisit" is bound to "tbl_Patients", but "frm_NewVisit" is bound to "tbl_Main" which acts as a container for all information (patient data, visit data,service done and service provider), so the form "frm_NewVisit" contains fields from different tables. I wonder if I should create "frm_NewVisit" as unbound form, then adding fields from different tables to it and using vba to populate "tbl_Main",

View 2 Replies View Related

Forms :: Requery 2nd Subform When Different Record Highlighted On First Subform

Sep 3, 2013

I have two sub forms on a main form.Subform 1 displays information which comes from a query, filtered using two combo boxes on the same form.The active record on the data sheet has two field values output to hidden text boxes on the form.

These text boxes then provide the values used for the query displayed on the 2nd sub form.When I highlight a new record in subform 1, the text box values change, but the values in sub form 2 do no.Which would be the best method to use to get this to requery?

View 10 Replies View Related

Forms :: Main Form Jumps Back To 1st Record When Moving To Next Record In Subform?

Mar 24, 2015

When I add a record in the subform and then move to the next record whilst still in the subform, the main form jumps back to its first record? I then have to move back to the right record in the main form to update the next record in the subform.

I want to move to the next record in the subform without affecting the main form.

View 1 Replies View Related

Forms :: Select Record From Combobox List And Have Record Populate In Subform

Sep 16, 2013

I would like to select a record from my combobox dropdown list and have that record populate in my subform. Currently, I am only able to select the 1st record at the top of the dropdown list to appear in my subform. But I would like to select any record from the dropdown list and have it populate my subform.

View 8 Replies View Related

Forms :: Open A Form For Adding Child Record Related To Highlighted Record In Subform

Oct 2, 2013

Is it possible to open a form to add a child record related to the highlighted record in the subform?

View 2 Replies View Related

Forms :: Saving New Record When Moving To Another Record In Same Subform

Jan 17, 2014

I have a subform with records of call details (date, time, subject) - the date and time are autogenerated and subject is a text field. After entering text in the subject field and then clicking on the close button in the main form, or clicking anywhere else in the main form, the record is saved to the table. However, if I enter text in the subject field and then move up to view previous records (within the subform) and then click the close button in the main form the record is not saved in the table. How can I either save the record before allowing the user to move to another record within the subform or before exiting the subform set the focus to the new record so that it will be saved on exit?

View 4 Replies View Related







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