Open A Form With A New Record With Selected Info Already Filled In

Sep 29, 2006

Hi again,

One last one that's been niggling me - I just can't fathom the code... I bet it's very simple...

I have a Form ("frmJobSummary") that shows all the jobs for a customer - the customer is selected and the Customers ID is stored in a Control called "CustomerID" (It's just a number)

I have a button that opens up a new form... "frmEditJob" This allows you to add a job to a customer. I know how to get it to open up as a new record... but...

How do I get it to open up as a new record (or job) for the customer selected on the form "frmJobSummary"?

Here's the code so far... all it does is open the form with the Current record. :(

Your help is, as always, most appreciated!

Private Sub OpenNewJob_Click()
On Error GoTo Err_OpenNewJob_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmEditJob"

stLinkCriteria = "[CustomerFK]=" & Me![CustomerID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_OpenNewJob_Click:
Exit Sub

Err_OpenNewJob_Click:
MsgBox Err.Description
Resume Exit_OpenNewJob_Click

End Sub

View Replies


ADVERTISEMENT

I Want To Open A Form To A Selected Record.

Mar 20, 2008

I have a form that updates records. When the user opens the form in data entry mode, it is too difficult to find the correct record. What is the most efficient and simple way to have the form open to a specific record?

Solutions I have considered are a popup form that the user will enter the equipment code (which is the unique identifier of all records). Also, the user may not know the record number, but they will always know the equipment code (which is a field in the "equipment" table).

But I am not sure of the best way/best order to do this.

Thanks.

View 14 Replies View Related

Open Form To Selected Record From Listbox

Dec 13, 2006

Yet another question.

I have a listbox on a form that show all Files for a particular volunteer. I have an "Edit File" button below the listbox to be able to edit that particular file. Is there a way about opening that form to that specific record without using a query?

Thanks
ScrmingWhisprs

View 12 Replies View Related

Open A Record In A Form When Selected From List Box

Jan 19, 2005

Hi folks,

I have created a form, which extracts records from a table and displays them in
a list box. This works, but what I want to do next is highlight a single record in
that list box, click a button and have the record open in another form. This is
the code I have at present:

Private Sub DisplayEnquiry_Click()
On Error GoTo Err_DisplayEnquiry_Click
Dim dispCriteria As String

dispCriteria = "[SupportEnquiriesTable].[EnquiryID]='" & Forms![Search All].[ListSearch].Column(0) & "'"
DoCmd.OpenForm "Support Enquiries", , , dispCriteria
Exit_DisplayEnquiry_Click:
Exit Sub
Err_DisplayEnquiry_Click:
MsgBox Err.Description
Resume Exit_DisplayEnquiry_Click

End Sub

When I try this I get an error "The OpenForm action was canceled. You used a method of the DoCmd
to carry out an action in Visual Basic, but then clicked Cancel in a dialog box."

I've double-checked that I've typed in the correct names etc. so I am at my wits end!
Can anybody help me out?
Thanks

View 1 Replies View Related

Wrong Record Selected From Macro Of Open Form Button

May 1, 2012

I have a parent form showing some of the contents of a single record in a parent table. This form contains a button that opens a specific subform (using an IF statement based on the contents of another field in the parent table/form. There are actually any of 8 child forms/tables that could be selected and the related record is in only one of them. The relation between the tables is based on the PK of the parent table and the related FK in the child table. and the data is correct in all tables.

My problem is that when I run this button on the parent form/table it returns the appropriate form/table, but displays the first record rather than the related record. In the past (using this same process) I have been successful in getting to the right record by fiddling with the where statement (sometimes putting in a equal sign or taking it out fixes the problem). However, no matter what I do to the Where statement nothing works. I have not yet placed the final else condition for where the form selection field (VMValIdentType] is empty yet as there is no point at this time.

Here are the button macro contents:

If [VMValIdentType] = "Software"
OpenForm
Form Name: tmpVMValSW
View: Form
Filter Name:

[code]...

View 7 Replies View Related

Forms :: Open New Form With A Specific ID (or Name) Filled In

Feb 4, 2014

(MACROS ONLY)I am looking for a way to open a form in order to add a new record. The idea is that I open up the form with a MemberID and possibly the name already filled in on the relevant form. It is merely for ease of use regarding the user.

I have got as far as opening the the new entry form. I just need to pass the MemberID into the relevant field. If I use the wizard it is just finding a record of a pre-filled entry.

View 7 Replies View Related

General :: Open Word Document With Corresponding Data Filled From Text Field Of A Form

Jul 10, 2013

I am trying to open a word document with corresponding data filled from the text field of a form. I managed to get the word document but I don't know how to give a variable in word document.

View 2 Replies View Related

Open Second Form Based On Info In First.

Feb 2, 2005

I have a Form1 that is based on a select query with a criteria [Enter PIN number]. When we enter the PIN it returns the correct result. I want to have a button that opens a second form based on the same PIN number entered to open the first (in fact there will be numerous forms I want opened based on this PIN).

Example:

Sidewalk - button
Curb X button
Tree - button
Hydrant X button


In the example above, only CURB and HYDRANT returned an entry. Therefore when I click on the button next to CURB I'd like the frmCurb to open showing the data based on the PIN numbered entered to open the From1, and when I click on the button next to HYDRANT it would open frmHydrant showing the data for HYDRANT based on the same PIN number entered to open the Form1.


Thanks,
SKK

View 12 Replies View Related

Macro To Open Form When Report Is Selected

Sep 16, 2014

I have a report that is based on a query. The query has filters in it based on user info entered from a form. So the form asks the user to select which division of the company, and the date range for when the info applied to. My issue is that I am trying to set a macro that opens this form whenever some tries to open the report.

But the macro appears to run the query before it opens the form and it gives me a generic message box asking for the division. After I type that in (instead of selecting from a drop down list like I have on my form) another window pops up asking for start date, etc...instead of opening the form I created. What am i doing wrong and how do I get the macro to open my form? If I open the form directly and enter the criteria, it runs the report correctly.

View 7 Replies View Related

Open Form Based On TableA / Add Info And Save Results To TableB

Dec 1, 2012

We have Cardiac Rehab patients that come 3 times a week (M-W-F). Once they are on program they stay there for 3 months. There are classes given hourly from 8am thru 6pm. There are 12 available slots per class. Right now this is being handled in Excel, but I thought I might improve things by putting it in Access.

The Excel "form" I built has fields for PatientName, MedicalNotes, DoctorName, and Notes. Because the names rarely move (a patient gets a slot and stays there) the user opens Excel, reviews the form to make sure no one cancelled-is out sick-etc, then prints the schedule. When the day is complete I have a macro that takes this information and saves it in a tablelike manner on another sheet. A dynamic pivot table references this info to give the user quick answers as to daily volume, etc.

The thing I can't get my head around is how to make this as easy in Access. My thought was I could have a PatientT, listing all of the fields mentioned above. I could have DailyF open, bound to PatientT, with additional unbound textboxes to add "today's date", cancellations or no shows, and then Save all of this in another table and print out the daily schedule.

View 7 Replies View Related

Forms :: Open New Form From Selected Group Of Records

Aug 8, 2013

I'm developing a database where people basically can fill in an order form and then the database can track if the order has been placed, when it came in etc.I have a form called frm_Suppliers to be Ordered that runs off a query. The tables that relate to the query are called tbl_Products, with a primary key called ID and tbl_Suppliers, with a primary key called Supplier ID.

The form called frm_Suppliers to be Ordered, shows a list of suppliers that have open orders. Each supplier may have several orders open. I want to be able to click a button after each supplier name and bring up a continuous form that relates to all the records from that supplier that have open orders.

I have tried using the code found in the thread called "open a form based on the record that is selected in current form" from 06-08-2011, however it will only work when my form lists each open order separately, not when they are grouped by supplier.

View 2 Replies View Related

Forms :: Double Click Event - Form Showing 1st Record Instead Of Selected Record

May 8, 2014

I am new to access and I recently encountered a double click issue

My form loads perfectly on double click event but it shows the first record instead of selected record.

My search is based on a PersonID but each PersonID has different WorkID that I wish to display on double click but it always shows the first WorkID instead of my selected record

I have tried changing the filters in the form properties but it still doesn't work for me.

Here's my code:

Private Sub SearchResults_DblClick(Cancel As Integer)
DoCmd.OpenForm "WorkForm", , , "[PersonID]=" & Me.[Searchresults], , acNormal
End Sub

[Searchresults] draws information from my Query

Query information:

PersonID... WorkID... Type......Location
1234..........1............Paint .....Address A
1234..........2............Electric...Address B
1234..........3............Floor..... Address C

View 7 Replies View Related

Remember The Selected Record - Requery - Then Go Back To Selected Record...

Jun 28, 2005

Hi guys,

Bit of a problem I'm hoping someone can help with. I have a telephone call logging system. The system is a tabbed form with each tab representing a person's Telephone Call Inbox. As new calls are entered into the database, they appear in each person's inbox until they are marked as dealt with.

This all works fine and there are no problems with the basics of it, but the problem I do have is that after I have split the database into a Back end and a Front end and distributed the Front ends to each user, when a new call is entered it doesn't appear in the persons inbox until they do a requery.

At first I sent the form to requery using the ontimer event, but the problem I have is that after every reqery the form goes back to the first record. A user on the office forum suggested I use the following code:

vCurrent = Me.Bookmark
Me.Requery
Me.Bookmark = vCurrent

But this gives me invalid bookmark errors, so I was then told to add

On Error Resume Next

But this stops the bookmark function working and instead the first record is loaded every 1 minute (as set by my timer).

Can anyone recommend a better way that actually works without invalid bookmark errors?

View 14 Replies View Related

Hide/disable Record Info At Bottom Of Form

May 9, 2006

Apologies if this is an obvious one but is it possible to hide this:

"Record:1 out of 34" and the arrow buttons at the bottm of a form(s)?

I would rather use my own Next Record and Previous Record buttons so it would dieal to disable/hide these arrow buttons.

Many thanks for your assistance in advance,

Paul.

View 2 Replies View Related

Modules & VBA :: Retrieve / Validate Data On 2nd Form Based On Record Selected On 1st Form

Jul 29, 2013

Can I look up and verify data on a "second" form based on a selected record from first (still open) form.

I am trying to allow users to select a User Name from a combo box list and then open "Change Password" form when they select "Change Password" for that selected user name.

My problem is that I can't figure out how to associate and verify the data tied to the user name selected on the previous (Login) form ( I am trying to validate the old password tied to that selected record).

I have the first login form created, and it's working just fine. I also have the change password form created (and it's displaying the user name selected from the first form using:

Code:
Private Sub Form_Load()
With Forms![frmLogin]![cboUserName]
Me.txtPwdChgUserID = .Column(2, .ListIndex)
End With
EndSub

I also have the code written to validate and confirm old password, new password and validate new password (when the save button is clicked). I have yet to update the password with the new password (still trying to figure that out).

Attached zip file has screen shots of the two forms.

View 3 Replies View Related

Setting A Combo To The Record Selected In A Form

Feb 8, 2005

Hello,

I suspect this is probably rather easy, but I've not been able to figure it out:

I am using a combo to select a record in a form. This works.

The problem is: When I navigate through the records in the form, the combo box does not "update". I need to be able to change the record displayed in the combo box as the record in the form changes.

Any ideas?

Many thanks in advance for assistance.

View 8 Replies View Related

Find A Record On Form Based On Value Selected In Combo Box

Jun 2, 2014

I am trying to add a combo box into a form and when the Combo Box wizard pops up I only get two choices:

I want combo box to get values from another table or query. I will type in the values I want

I want the third option...

Find a record on my form based on the value I selected in my combo box.

Why am I not getting the third option??

View 1 Replies View Related

Filtering A Form From A Selected Record On A Pop-up Form

Jan 25, 2005

I've search around the forum and haven't come up with the answer yet.

So here goes...

I have a main form (GRCSearch) that is tied to a table (StoredSearches). When users enter data in this form it saves it to the table. It is a single record form. The data entered by the user is used to search a big second unbound table via some queries.

The search data entered is then recorded to the table (StoredSearches) as a way for the user to track searches and to recall them if they want to run the same search again.

I've created a pop-up form that displays a continuous record layout of the StoredSearches table and a command button at the left of each record.

I want the user to be able to click the command button to the left of each record in the pop-up and that in turn set the focus of the main form to that record. It recalls the search data, repopulating the search fields of the main form. And in the onclick event I'll also have it close the pop-up window.

I however cannot find any references to setting the focus from one form to another form this way. I've found plenty that changes the focus of a form from an embedded subform.

Any ideas?

Thanks!!

Scott Doyle

View 1 Replies View Related

Forms :: Display Button On Selected Record In Continuous Form

Oct 30, 2014

I have continuous form in Access 2010. I highlight selected record. Now I would like when user will select record, that record will display button to give ability user delete it. For not selected records button not visible and disable. How to display button only in selected record in continuous form?

View 2 Replies View Related

Record Lookup In Form Flashes One Or More Records Before Displaying The One Selected

Dec 3, 2014

I have a form (Student Details) that has an unbound lookup box using a query to select a student. The lookup has the hidden Student ID autonumber key field plus Class Number, Last Name, First Name, Status, sorted by Class Number (descending), Last Name, First Name.

The form record source is a similar but unsorted query.

There are nearly 1000 student records. The form has pages (tabs). The lookup box is in the form header. There are dozens of fields in the 1st Page (General) including an picture (attachment, not hyperlink) field holding a photo of the student, the other 6 pages have less.

When you select a student via the look up, at least one sometimes more students "flash" before it displays the one you want, which seems to display twice before it stops.

I deleted the picture field to see what difference that made, because it seemed to do the most flashing, and indeed, without that field you go right to the record. I looked at the Student table indexes and it seems that field type is not index-able, which is understandable.

Is there any way to improve this with still leaving the photos as attachments? Some thoughts:

It improves if it is displayed first as an Icon or Paper Clip, and probably would if a hyperlink field, but we like to have the picture displayed and not have to open the link to see it nor worry about the location changing invalidating a link. It seems that if the record was displayed with the picture field only filled after all the other fields were filled it would make for a better impression.

Can an On Load form event VBA or Macro be written that either hold the picture back until the rest of the fields are displayed or if an icon or changed to a hyperlink to open. Would it work if the pictures were attached to a separate joined table?

View 11 Replies View Related

Forms :: Access 2010 The Same Record Be Selected In Each List Box Within The Form With Tabs

Sep 21, 2013

I have a form with 3 tab controls. Within each tab, there is a bound list box that lists records based on a combo box selection. All list boxes are bound to the same table and records in each tab will be in the same order.

Tab1, listbox1:Field1, Field2, Field3, Field4
Tab2, listbox2, Field1,Field2, Field5, Field6
Tab3, listbox3:Field1, Field2, Field7, Field8,Field9

I would like the same record be selected in each list box within the tabs, e.g. when record #2 is selected on tab1, the same record will be selected on tab2 and tab3, or if I click on tab 2 again and change the selection to record #3, record #3 will be selected on tab1 and tab2.

View 3 Replies View Related

Forms :: Main Form Show Record Selected Within Datasheet Subform

Sep 30, 2013

The situation is i have two forms, looking at the same table, but the main table shows more records, I would like to select a record in the datasheet subform and have the main form flick through to the corresponding record.

View 5 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 :: Clicking A Record On A Datasheet Form To Open Record In A Pop-up

Apr 23, 2013

I have a form "IntUnderwriterSearchByName" which is based on the query "Search by Name". This form opens with a parameter (please enter name of broker) and is set out like a datasheet with the following fields- "Broker Name", "Domicile", "Broker Code" and a couple of others. I'd like to be able to click on a record and open the form "IntUnderwriterPopUp" so that the details of that specified record are displayed.

Broker Code is what I'd like the form to look for and this Broker Code is unique for every one of the 900 or so records. This code can be numerical e.g. 01233 but also can be a mixture of both e.g. EU2885. It is also worth noting that this code is not the primary key- i have an autonumber (called ID) that does this- but this field does not appear on the form.

View 7 Replies View Related

Open Record In Main Form By Clicking Record ID In Subform

Dec 16, 2014

I am creating an events database. In my main form, I have all the details of a single event (billing code, fees, customer, support personnel, etc.). Then, I have a subform (form view) that lists each of the other services which share an event ID (this ID comes from a separate, unrelated events management suite). In the subform, I display the most-commonly-edited fields so that they are editable without navigating to a different record.

However, there will be instances where it becomes necessary to navigate to one of the records listed in the subform. I would like to make this a quick process by just clicking on the primary key in the subform, and have the corresponding record appear in the main form.

In my searches I've found a common suggestion to use a DoCmd.OpenForm method where the form opens to that specific record -- in effect filtering by the primary key number. I don't prefer this method because it disables the ability to navigate to other records using the previous, next, find records, (etc.) buttons without closing and re-opening the form.

Is there a way to make the main form 'jump' to a specific record by clicking on a control in the subform, without limiting the ability to navigate in the main form?

View 10 Replies View Related

Combo Box To Open Subform For Assets Info

Jul 18, 2005

:confused: I have created a frame which controls two seperate combo boxes for searching based on either serial or name. What I'd like to do is have the user combo box [after update] to open a sub form with all of that specific users particular assetts. Only by that user.

HEre is the code for which I've already got. Also I've already created a query which controls the subform to find only a particlar users assets:

Private Sub Combo106_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Serial #] = '" & Me![Combo106] & "'"
Me.Bookmark = rs.Bookmark
End Sub

Private Sub Combo108_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Users] = '" & Me![Combo108] & "'"
Me.Bookmark = rs.Bookmark
End Sub

Private Sub SearchFrame_AfterUpdate()
'Make the appropriate combo visible
If Me!SearchFrame.Value = 1 Then
Me!Combo106.Visible = True
Me!Combo108.Visible = False
Else
Me!Combo106.Visible = False
Me!Combo108.Visible = True
End If

End Sub

View 1 Replies View Related







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