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 Replies
ADVERTISEMENT
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
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
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
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
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
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
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
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
Jan 12, 2006
Hello,
i have managed to get my form button to open another form to a specific record but this doesnt always work, i have used to wizard in access to do it some times it works other nots.
could any body help at all.
i believe it could be a problem with my relationships. i have deleted them al to start again, but i am having trouble setting them up!
many thanks
aaron
View 1 Replies
View Related
Feb 1, 2005
can someone please help me with some code.
I want a form - when opened - to open showing the clinic details for the next week (ie date() + 7)
The field in question is called DateID
Do I use the Event OnOpen or On Load.
Thanks
View 3 Replies
View Related
Feb 8, 2005
I know this has to be an easy fix but I can't find it. I would like to open my form with empty fields, in the first field, ready to go. Right now it is opening with the first field of the very first record. Please help
View 2 Replies
View Related
Oct 10, 2005
If I have a form that has a field called Episode_Date how do I open the form to the record with the most recent date?
View 7 Replies
View Related
Mar 14, 2005
hello,
i have an .mdb file, with one main form in it.
i want to send to some friends of mine this file, but i want that when the file is opened, automatically, that main form will be opened.
how can i do that?
thank you.
View 4 Replies
View Related
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
May 19, 2015
I have 4 forms in my access file. Now I have 4 buttons in html and I wanted to know if there was a way to open a specific form view based on the button click in the html page.
So access will open and show the form that is linked to the selected button in html.
View 14 Replies
View Related
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
Sep 16, 2011
I created a search form that searches for Customer Number, Part Number, and Revision Number. The results are displayed in a List Box.
I want the user to be able to make a selection on the List Box and click an "Open Selected" button that launches that record in another form. How is this possible?
View 9 Replies
View Related
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
Oct 28, 2005
Another Simple one From jeff.
Upon opening a form how do you get it to open to a new record rather hen the first record. Thanks All. Jeff
View 4 Replies
View Related
Dec 24, 2005
looking for help again!!
i am trying to switch between 2 forms using a command button..
i have 2 things i am trying to achieve
i want the form to open up at a new record as at the moment it seems to be opening at the last record created.. i have tried to use an open form function for new records but that doesnt seem to work.
secondly i have tried to use the code below to go to the next record then close the form and open a new one...
DoCmd.GoToRecord , , acNewRec
DoCmd.Close
DoCmd.OpenForm ("Welcome Page")
but so far all it does is open the new form it doesnt go on to the new record in the current one!!!
hope it makes sense
cheers
si
View 4 Replies
View Related
Dec 24, 2005
looking for help again!!
i am trying to switch between 2 forms using a command button..
i have 2 things i am trying to achieve
i want the form to open up at a new record as at the moment it seems to be opening at the last record created.. i have tried to use an open form function for new records but that doesnt seem to work.
secondly i have tried to use the code below to go to the next record then close the form and open a new one...
DoCmd.GoToRecord , , acNewRec
DoCmd.Close
DoCmd.OpenForm ("Welcome Page")
but so far all it does is open the new form it doesnt go on to the new record in the current one!!!
hope it makes sense
cheers
si
View 4 Replies
View Related
Feb 2, 2006
I have a switchboard form that opens with the database. One of the buttons on it opens up a standard form for entering names and addresses.
I created the button with the button wizard, so the standard code:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Enter Details"
DoCmd.OpenForm stDocName, , , stLinkCriteria
However, this opens the form with record 1 loaded. There is a danger that someone might accidentally enter data over that, so I would like it to open up to a blank record (at the moment, users have to know to press the ">*" button). How can I do this?
Thanks in advance for any help... and for putting up with me of late! ;)
View 7 Replies
View Related
May 4, 2007
hello,
I have form "QUOTE" (which has a check box "GenerateOrder") and form "WORK_ORDER". Once I click on "GenerateOrder", I want form "WORK_ORDER" to open, and I want to assign a value from a txtBox in form "QUOTE" to another txtBox in form "WORK_ORDER" creating in this way a new record on form "WORK_ORDER". I want to make clear that as soon as the value is passed or assigned to the txtBox in form "WORK_ORDER", a new record for this form should be created.
I tried this code:
Private Sub GenerateOrder_Click()
If (Me.GenerateOrder.Value = True) Then
DoCmd.OpenForm (WORK_ORDER)
[Forms]![WORK_ORDER]![QID] = [Forms]![QUOTE]![QID] 'assignment
End If
End Sub
but it doesn't work
Thank you very much
View 2 Replies
View Related
Mar 25, 2005
I would like to create the following functionality on a form in my database:
When the form is open, and a record is displayed on the screen, I want to add a button that will open up a second form displaying information related to that record.
To be specific, I have a form called "Contracts". Each contract record contains a customer name in the field "Customers." I want to create a button labeled "Customer Details" that will open a new form, "ViewCustomers" displaying the record associated with the value entered in the "Customers" field for the current (displayed) record only.
I have been trying to use a hyperlink to a macro that uses "OpenForm," form name "ViewCustomers," but I don't know how to filter it down to just the current record.
I hope any of this makes sense. Any insight would be really helpful.
Thanks! -Matt
View 2 Replies
View Related
Feb 16, 2006
Guys
I've searched the database and found similar problems but don't understand the replies (mainly DCount()).
I have a control form where a user can search the database by entering information. The form asks them to type some text that will appear in a description field, and match any records with the same text.
However, when the user types the text and clicks the button to open the form (which is linked to a query searching the description field), I want a message box to say no records found before opening the form. Mainly because when it doesn't find a matching record, the form opens with a new autonumber.
I either want a matching record to appear, or a dialog box saying no matching records found and the form not opening therefore not creating a number that is not used.
I tried in the command button entering if recordcount>0 then openform but it doesn't like the else statement or doing a if recordcount=0 underneath.
Any ideas?
View 5 Replies
View Related