Open Form To Matching Record On Another Form
Jun 7, 2007
I have 2 forms.
The first form is called "entry"
the second for is called "play"
I am trying to open the play form on the click of a button so that it displays the records matching the value set for the [playid] field in both forms.
Can anyone help me with the code?
View Replies
ADVERTISEMENT
Feb 9, 2006
I have two forms in my database. One for equipment and one for the network information.I want to open the frmIP from the frmEquip and be on the coresponding record by matching the NIC Mac address field.Currently, I can do it but it is done by a filter...I don't want a filter...I just want to open to that record but be able to access the rest of the table without turning off the filter.Here is my code:Private Sub cmdOpenIPForm_Click()On Error GoTo Err_cmdOpenIPForm_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "frmIP" stLinkCriteria = "[NIC_MAC]=" & "'" & Me![NIC_MAC] & "'" DoCmd.OpenForm stDocName, , , stLinkCriteria Exit_cmdOpenIPForm_Click: Exit SubHow can I open the form and goto the record with the matching NIC_MAC (without a filter)?Thanks for the assistance, Jeff.
View 2 Replies
View Related
Oct 21, 2005
I have four similar forms - they each have a list box and an "edit" button.
The user selects the item in the list box and clicks edit.
Another form pops up, open to the record that was selected in the list box.
This works in two forms, it doesn't work in the other two forms. Instead it pops up the first record in the table, regardless of what is selected in the list box.
The code is identical on all four "edit buttons." (with field names changed, of course.)
Code:Dim stDocName As StringDim stLinkCriteria As StringstDocName = "frmCaseTypeEdit"stLinkCriteria = "[Case_Type_ID]="&Me![listCaseTypes]DoCmd.OpenForm stDocName, , , stLinkCriteria
The properties in the listboxes are also the same on all four forms - based on a query, 3 columns, and bound column is the first one (which is the ID field).
Does anyone have any ideas what could cause this?
View 3 Replies
View Related
Nov 2, 2014
I have a bit of code that upon a button click will check to see how many records match (CustomerID); if there are no records returned it goes to another action (works fine), and if there is a record returned, it opens another form to that record (again, works fine).
However, should there be more than one record, how do I get it to open the first one?
The code to open the form is
Code:
DoCmd.OpenForm "PublicComplaintsMain", , , "CustomerID='" & varInput & "'"
Once the form is open, what code would I use for a command button to find/goto next matching record (as I haven't used .FindRecord in the first instance, .FindNext won't work - or will it?)
View 1 Replies
View Related
Nov 25, 2013
This is my data:
Table: "Facility Info"
Data in the table: "facility", "city", "date", etc.
Query: "Q Facility"
Report: "R Facility"
Form: "Main Form" is where the data is entered that goes into the "Facility Info" table.
In the "Main Form" there is a dropdown box where I can select the "facility".I would like to add a button to this form that opens my report "R Facility". But this report is a collection of all the facilities and I would like it to just report the ones for the facility that I selected from the dropdown box on my "Main Form".
View 9 Replies
View Related
Sep 18, 2012
My situation is that the access form field name is "Number" , there is a folder named "member" in
desktop C:UsersTomDesktop
For example If i press the command button (Field name "Number" is 123) in form , then automatic open named "123" folder inside named "member" folder
What is the Command button Code ?
View 4 Replies
View Related
Aug 25, 2011
I have a subform in which I want to put in a Command Button to open another form.
I used the wizard as per normal, but when you come to matching specific data fields, there is nothing in my left hand column of the sub form. I have checked the record source property and it is bound to the correct table.
I have read that this is an issue with Access 2007? Is this the case or am I missing something obvious here?
View 3 Replies
View Related
Dec 17, 2014
I'm wondering why the Record ID in my Form doesn't match the ID of that record in the system. This is consistent across all of my records?
View 6 Replies
View Related
Jul 30, 2014
I have a continuous form in which I put a command button for each record called "detail". I would like to click on the "detail" button and make it open another form containing all (and only) the info on this record.
At first I refused to use an "id" to link both forms, but finally I added the "id" in the table... however still does not work.
continuous form: "04 - GASTOS_BUSQUEDA"
id field on continuous form: "Gastid"
pop-up (details) form: "GASTOS_EDITAR"
id on pop-up (details) form: "editar_id"
This is what I have tried on the "click" properties of the "details" button field (called "btn_editgs"):
1)
DoCmd.OpenForm "GASTOS_EDITAR", acNormal, , "[editar_id] = " & Me.Gastid
2)
DoCmd.OpenForm "GASTOS_EDITAR", , , "[editar_id]=" & Me.Gastid
3)
stLinkCriteria = "[editar_id]=" & Me![Gastid]
DoCmd.OpenForm "GASTOS_EDITAR", , , stLinkCriteria
4)
Private Sub btn_editgs_Click()
On Error GoTo btn_editgs_Click_Err
Dim strWhere As String
strWhere = "[editar_id] = " & Me.Gastid
DoCmd.OpenForm "GASTOS_EDITAR", , , strWhere
btn_editgs_Click_Exit:
Exit Sub
btn_editgs_Click_Err:
MsgBox Error$
Resume btn_editgs_Click_Exit
End Sub
View 9 Replies
View Related
Jan 27, 2014
I am trying to create a proposal log for my company to make things easier to track. I have made a multiple items form to list the proposals. I want to be able to double click the record to open up another form (that i have already created) that shows the information from the proposal table and the proposal details table. So.....
I want to double click the field named "Proposal Name" and have it open up to form i have called "proposals details form".
View 3 Replies
View Related
Apr 2, 2014
I have a main form[frmResearchNotes] with combo box controls that filters a query populating [subfrmNotelist] containing several records from the filtered query. From there, I double click on a field within one of the remaining records, [CompanyName] for example, and it opens the new form[frmNoteDetail]. The problem is that second form is not displaying that selected record. The second form's record source has been set to the same query so when it loads, it displays the same info but it's displaying the 1st record out of the entire filtered list, not the record I clicked on in that list.
I figured I could use the strWhere function to copy the record I selected in the event procedure and then open the new form with those details. Not sure how to actually do this with VBA or if it's even the correct approach.
View 14 Replies
View Related
Apr 17, 2014
I have three objects a Main_Table , ClientDataForm and a MapForm all three share a common ClientID number
From that Main_Table I have created a ClientDataForm form which I enter all Data
From ClientDataForm I wish to create a button on it which runs a Macro that Saves ClientDataForm Record and then populates another form named MapForm with whatever record is currently open in Form One whether a newly created one or previous record.
How would I write this code for that button? Also why I would write it that way?
View 3 Replies
View Related
Nov 7, 2006
I have code for a button click event. Essentially I have a main table form that I use to enter customer data and info. I also have a button that I use to add that customer to a separate table that I use for special Customers. My code copies all the data I need copied to my other table, so I wont waste space here typing my code that actually copies the data to the new table. What I will list are the two commands I am using after that code, to close the current form (the one with the button) and open the form for entering special customer information (the form to edit data on my other table). It works flawlessly, but when it opens the other form, it opens to the first record. I want to know how to make it open to the record which I was viewing when I clicked the button to copy the data.
DoCmd.OpenForm "Special Customer Data Entry", , , Number = Me.Number
DoCmd.Close acForm, "Customer Data"
View 9 Replies
View Related
Aug 2, 2006
I have a database with three tables
table 1 (form1)
reference (PK) auto number
table 2 (form2)
Reference (fK)
workbook reference (PK) auto number
Table 3 (sub form within in form2)
Reference (FK)
workbook reference (fK)
data Reference (pk) auto number
Each table is a form that is linked via the keys. On form 1 i have a button that is to open the form2, which it does but every time i open the form a new record is added. Why and how do i prevent this.
Then what i want to do is add a button for a new form on table 2 form but use the same reference as the record as presently displayed. How do i add new record using the same Reference but new workbook Reference?
Thanks is advance
View 1 Replies
View Related
Oct 2, 2013
I have been an MS Excel man all along my career and I am a novice in MS Access.I have created a table, [Initial Customer Approval] which records data from a Form, [Initial Customer Approval]. Once the data is entered in the Form, I need to do some calculations based on the data entered in some of the fields in the form.I created 6 different queries for the six possible values in those fields. now for each of those queries I created respective reports.I placed a Print command button in the Form.
1. When I press the Print button it should open the report for the current record in the Form. (Currently It Opens all the reports simulatneously, with only one relevant report containing the current record; other opened reports being blank.)
2. If user presses the Print button before pressing Save button then system should prompt user.
Here is the code (Please note [reference number] is the unique ID generated for each record entered in the tabe through form):
Private bSaveClicked As Boolean
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not bSaveClicked Then
MsgBox "You are trying to navigate away from the active record. Please either save your changes, or press ESC to cancel your changes.", vbOKOnly + vbInformation
Cancel = True
[code]...
View 5 Replies
View Related
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
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
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
Jan 14, 2008
Hi,
i have a form that has various buttons. one button will open a form to add a payment based on the person shown on the main form. how can i open the new form to be ready for a new record but already set up for the person shown? for example:
"main form" the name shows Nigel Shaw
press button " add payment"
Payment form opens on top ready to receive info with my name already shown.
i have based my payment form on a qry and i core around ContractorID
many thanks,
NS
View 3 Replies
View Related
Mar 19, 2005
I have a form with a sub form. The form allows users to enter data into the database and the subform displays all records in the database. I want users to be able to click on one of the records displayed in the subform and that record to display on the form in the format it was entered.
View 1 Replies
View Related
Apr 12, 2005
I have a database to keep track of my mp3 collection. Amongst my tables I have the following:
tblSingers (SingerID, Singer etc)
tblAlbums (AlbumID, Album etc)
tblSongs (SongID, Song etc)
tblSongsSingers (SingerID, SongID)
tblSongsAlbums (SongID, AlbumID)
Eventually, from these tables i created the required queries and forms.
Now i created a new form for searching purposes, so in the form header i put some unbound combo boxes which are populated from the above mentioned tables (ex. the singers combo, has this rowsource
SELECT tblSingers.SingerID, tblSingers.Singer FROM tblSingers ORDER BY tblSingers.Singer; ... with a column count of 2, widths 0cm, 2.542cm). Eventually, when i choose a singer from this combo box i will requery the form, and it will display only those songs for the singer chosen. So far so good.
My problem now is here, i want that from the records which are displayed if i will double click on them, the main songs form will be opened and it will display the record in this form as well.
In similar situations I used to do it as follows:
Dim stLinkCriteria As String
stLinkCriteria = "[txtSongID] = " & Me.SongID
DoCmd.OpenForm "frmSongs", , , stLinkCriteria
However, this time first i am getting the parameter box to enter the txtSongID and then another parameter box prompting me for qrySongs.Singer and if in this boxes i will try to put some data, i get run time error 3009.
Any ideas what might be wrong pls ?
Thanks
View 8 Replies
View Related
May 12, 2005
I want to make a form where I can only make a new record. I basically need a normal form that opens and automatically clicks the new record button. I do not want to be able to view and of the other records, only see the new record that I am putting in.
View 9 Replies
View Related
May 12, 2005
My form is opened with an on click event:
DoCmd.OpenForm "FrmEnhancedEnrolment", , , , acFormEdit
MyValue = InputBox(Message, Title, Default, 100, 100)
The msgbox then gets the value of the record I wish to find(at present the form is at the next new number despite opening on edit)
I am not sure what method to use to get it to open at the selected myValue.
I am searching on studId PK so I guess I have to convert the string from input box to a long.
help would be much appreciated.
I tried this also:
DoCmd.OpenForm "FrmEnhancedEnrolment", , , "[studentid]='myvalue'", acFormEdit
but it reports docmd action cancelled.
regards
View 4 Replies
View Related
Nov 3, 2005
I am starting to get back into access and I am finding out that I am very rusty at it. I am having a hard time figuring out how to open a form from a button on a specific record. What I have is a table that is built like this:
Shop Table
ShopID
Shop
What I want to do is have a form that has a button for each shop in the "Shop Table" and open a form showing only the records for each shop. I am sure this isn't very hard but for some reason I can not get it to work no matter what I do. Thank in advance.
View 7 Replies
View Related
Nov 10, 2005
Hello, it's me again, Forum People.
What I want to do is click on a button in an existing form which shows one record at a time, and another form opens that relates to that particular record.
The current form has a subform in a one to many relationship.
How do I do this?
Mrs Miggins
View 1 Replies
View Related
Dec 21, 2005
please help me how can i open the form showing the last record
View 4 Replies
View Related