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 Replies


ADVERTISEMENT

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

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

Opening A Form At A Specific Record

Dec 23, 2005

Hi all

Im currently designing one of my first databases!

I've initiated a log on procedure, with a password.

A user enters their ID and password. Once the correct password is entered, the next form is then loaded up, to which they make some choices.

My problem is that I have lots of users, and I would like them to only access the page that is relevant to themse, and NOT be able to see anyone elses.

I gather there is a little bit of tweaking to go on the
docmd.openform...

line, and somehow incorporate the userID, but not entirely too sure what it is.

Apologies if this seems really easy!

All help appreciated - many thanks!

View 2 Replies View Related

Opening A Form To A Specific Record

Dec 10, 2004

I have a Calibration form, with a button on it that links to an Equipment Inventory form. In the Calibration form, you choose
the instrument you want to calibrate from a combo box (which in turn automatically selects the barcode number for the instrument in another combo box), then if you need to edit info on it (ie. serial number), you click the button

Now, I need the Equipment Inventory form to open to the record that matches the bar code in the second combo box

anyone know a simple way of doing this?

View 1 Replies View Related

Modules & VBA :: Opening A Form To A Specific Record

Nov 21, 2013

I have a table that has two forms linked to it - one is the Main Form which is used to input the data for the bulk of entries, however on some entries there will be some additional data required which the other form (lets call it Time Form) takes care of.

What I would like to do is have a button on the Main Form that opens the Time Form, and then go to the specific record that is open on the Main Form;I have an ID field (Autonumber + Primary Key) which displays in a text box on the main form, and it would provide the number of the record for the second form to open.

View 7 Replies View Related

Forms :: Opening New Form With Specific Item In Drop Down Box

May 31, 2013

I have a master form for lack of a better phrase and 3 other forms that represent specific items in the original drop down box. In the master drop down box, I have all 50 states, and the 3 forms are for 3 specific states. Here's the code I have so far but when I save, it says "The 'OpenForm' macro action has an invalid value for the 'Where Condition' agrument."

Option Compare Database
Option Explicit
Private Sub State_AfterUpdate()
Select Case Me.State
Case "CA"
DoCmd.OpenForm "Auditor Form (CA)"

[code]....

View 14 Replies View Related

Forms :: How To Hyperlink From Query To Specific Record In A Specific Form

Jul 23, 2013

I want to hyperlink from a query direct to the relevant record in a specific form. I have a hyperlink field in the form which shows up in the query. When clicked in the query, this hyperlinks to the form but I cannot make it select the correct record in the form.How do I get it to select the correct record?

View 3 Replies View Related

Opening A Specific Record

Dec 8, 2006

I have a form that displays customer account information. The form is connected to two tables. each customer has their own account number that i use to lookup their information. right now i have to click on the account number field and click find to pull up the record. I have built a popup form that displays the customers names with their respcetive accounts. My question is, How can i use the popup form to select a customer name and have the main form goto that record without using the find button.

thanks in advance.

View 1 Replies View Related

Finding And Opening A Specific Record From A Switchboard

Oct 5, 2004

I have created a database with a switchboard and a form ("RMA"). Currently, on my "RMA" form I have a command button that allows the user to find a specific record by entering an RMA number into an input box. My code is as follows:

Private Sub cmdFindRMA_Click()
Dim myFilter as String
If vFindRMA = "" Then 'vFindRMA is a global variable, string.
vFindRMA = InputBox ("Enter the RMA Number to find:", "Find RMA", "", 5000, 3000)
myFilter = "[RMA_Number]='" & vFindRMA & "'"
Me.Filter = myFilter
If Me.Filter = "" Then
Me.FilterOn = False
Else
Me.FilterOn = True
End If
End If
vFindRMA = ""
End Sub

I want to be able to remove this command button from my RMA form and add it to my Switchboard. My problem is, I don't know what code I need to use in order for it to work from the switchboard. Can anyone help?

S.Pommier

View 1 Replies View Related

Forms :: How To Get A Specific Record To Be First Record Of Continuous Form

Nov 8, 2013

I have a continuous form for which the recordsource is a query that retrieves dates from 10 days in the past to 10 days in the present. I want the record with today's date to be at the top of the form. The record with the oldest date is always on top. Is this a scrolling issue? How can I get the record with today's date to appear on top?

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

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 :: Open A Form Of A Specific Record?

Jan 26, 2014

1. I have created a button in a switchboard with embedded macro:-

Close Window
OpenForm (Form name: frmCustomerFind)

2. I have created a form "frmCustomerFind), in which I can select a customer name in a combo box named "CustomerName".

a. The row source: SELECT [tblCustomer].[CustomerID],[tblCustomer].

[CustomerName] FROM tblCustomer ORDER BY [CustomerName];

b. After Update Macro:

Open Form (Form name: frmCustomer)
SearchForRecord (Object Type: Form Object Name: frmCustomer
Record: First Where Condition = "[CustomerID]=" & Me.CustomerID

At the end, the form "frmCustomer" does open but not go to the record I want. It goes to the first record instead. (The frmCustomer has the "CustomerID" and "CustomerName" fields).

View 1 Replies View Related

Forms :: Open Form To Specific Record

Mar 31, 2015

Need to open a form to a specific record.Ive done the command button wizard that opens the form to a specific record but but that brings up the form with the filtered button showing.I've tried to put the formula into the filtered section but that doesn't work.I just want to be able to open the form to the specif record and then be able to navigate to other records if required (without aving to press the filtered button)

View 1 Replies View Related

Forms :: Open Tab In Form To Specific Record

Feb 9, 2015

Currently, I have a form with tabbed pages in it. The second tab, I have a subform inserted into it. I have a completely separate form that looks through records. I want to be able to click on a record from the separate form and open the Main tabbed form, to the second tabbed page, to a specific record. Currently I have:

Private Sub Form_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_Main_Data_Entry"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Forms![frm_Main_Data_Entry]![pgAgreement].SetFocus
End Sub

Which opens up to the tabbed page just fine. but I can not figure out how to get to a specific record.

Also, the subform in the tabbed page, doesn't have the same controls as the Main tabbed Form itself, so when I add something like:

strCriteria = "Agreement_Number = " & Me.Agreement_Number

it won't work because it is not reading from the subform in the tab, rather its reading from the main form controls.

View 1 Replies View Related

Forms :: How To Go To Specific Record In Listbox From Another Form

Dec 11, 2014

I have three forms: Form1 that contains subform1 and Form2 which is totally separate. Form1 contains a listbox that I use as a search form. When a record in the listbox is clicked, it populates Subform1 with more details.

If I am in Form2, I would like to be able to click a record which opens the listbox in Form1 to the same record (this will automatically update subform1 with the details).

View 7 Replies View Related

Forms :: Open Sub Form To A Specific Record

Dec 31, 2014

I have a form that lists a number of orders (list box).

I have another form that has customer details as the main form and the order as a sub form and then another sub form for items....

How can I open the sub form to a specific record? ie I want to view order 14?

View 4 Replies View Related

Forms :: Email Specific Record From A Form?

Oct 31, 2014

In Access 2010 I have built a FORM which has several records of several people. I am trying to email one record only to a certain person from that FORM. If I use the access email button it opens outlook but it sends all the records in the FORM to the person. I have tried even to use the micro, but still it attach all the records in the FORM and send it all as one bundle to other.

View 9 Replies View Related

Forms :: Open Form To Specific Record

Nov 5, 2013

No I know this one has been done, and I have a form with a button that this works on. Here is my problem. I have a list of parts in a continuous form, I added a button to open that specific record in a detail view and it works just fine. I used an open form macro and put in the criteria

="[Description]=" & "'" & [Description] & "'"

I have tried to use this similar procedure for another form, it however has two subforms in it and I get a data type mismatch in criteria exception error. I suspect that it has something to do with the subforms but am not sure.

View 13 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 :: Open Specific Record In Form From Login

Aug 20, 2013

I have been trying for weeks to get my login form to open up to a specific record on the mainform. I have built a form out of my Employee tbl (mainform). The table stores (ID,Name, password, EmpNumber ect.) I built a subform in that allows the user to type in the number of overtime worked on a paticular day. I have disabled the navigation on the main form so users can't advance to the next user but have enable the natigation on the subform so a particular user can advance to the next week of available overtime to input data.The goal is to get user login form to display a particular record on the main form and open a different form in the user is a supervisor.

Option Compare Database
Private intLogonAttempts As Integer
Private Sub cmdExit_Click()
DoCmd.Quit
End Sub
Private Sub cmdLogin_Click()

[code]...

'If User Enters incorrect password 3 times database will shutdown

intLogonAttempts = intLogonAttempts + 1
If intLogonAttempts > 3 Then
MsgBox "You do not have access to this database. Please contact your system administrator.", vbCritical, "Restricted Access!"
Application.Quit
End If
End Sub

View 1 Replies View Related

Forms :: Refer To Specific Record In Continuous Form

Apr 15, 2013

I have a main form with a continuous sub-form. On the main form I have a series of text boxes that I want to use as a makeshift status bar. The text boxes would be filled in if a value was entered into certain records on my sub-form.The problem I have is since the sub-form is continuous, how would I refer to the specific record on the sub-form that I want to check for a value?

View 6 Replies View Related

Forms :: Open Another Database Form On Specific Record

Jan 20, 2015

I'm wanting to open a record in another database, below is the code that opens the form to the correct record in the DB I want to open.

Code:
Private Sub btnDetail_Click()
DoCmd.OpenForm "fJob", , , , , , Me.Name
Forms![fjob]![txtJobNumber] = Forms![fJobAlphabetic]![fJobAlphabeticSub].Form![JobNumber]
End Sub

View 2 Replies View Related







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