Forms :: How To Open Form Depending On Field In Subform
Sep 22, 2013
I have a Table table_clients and a connected table (1-->many) table_invoices.
I have two forms:
form1(table_clients): all clients with subform1(table_invoices): all invoices for every client
the form2 and subform2 are the same, just objects are placed differently on page.
I want when I have opened a record on form1/subform1, to be able to click a button and open form2/subform2 filtered by the invoice_id and the client_id.
View Replies
ADVERTISEMENT
Jan 9, 2014
I have a mainform called frm_Main containing the field AgeCalc
I then have a a subform which has some tabs, one of those tabs contains a subform called frm_Bans.
If the AgeCalc field is <17 I want to disable the subform frm_Bans.
View 4 Replies
View Related
Feb 5, 2014
I am creating a training database and first I have tables in relationship to the courses:
tbl_Courses
Course ID (Primary Key)
Course Title
Objectives
Instructors (lookup field allowing multiple instructors to be selected, meaning they are skilled to teach the course)
tbl_Instructors
Instructor ID (Primary Key
Last Name
First Name
Full Name (Caluclated to put Last Name, First Name)
[code]....
What I am trying to do on a form to create a new event is once the user selects the Course from the Course ID combo box, then I need the Instructor combo box to only display the instructors who are skilled to teach the course which are selected in the tbl_Courses.
I can get all Instructor ID's, but not the names and the class that has multiple instructors show on one line.Should I have not put the Instructors field in the tbl_Courses? Do I need another table for instructor skills or something?
View 1 Replies
View Related
Sep 4, 2014
I have a form called frm002_PAF_MonitoringMAIN and on this form I have a subform called frm002_PAF_Monitoring. The subform has a button to another form for contact details called Contact_Details. The Contact_Details form opens with the details of the person who I have selected on frm002_PAF_Monitoring. There are some fields on frm002_PAF_Monitoring that I would like to be populated on Contact_Details when opened, like FirstName and LastName. How can I do it?I have tried on afterupdate event on Contact_Details below but those don't work:
Me!FirstName=[Forms]![frm002_PAF_Monitoring]![FirstName]
Me!FirstName=[Forms]![frm002_PAF_MonitoringMAIN]![frm002_PAF_Monitoring]![FirstName]
Me![FirstName].Value=[Forms]![frm002_PAF_Monitoring]![FirstName]
Me![FirstName].Value=[Forms]![frm002_PAF_MonitoringMAIN]![frm002_PAF_Monitoring]![FirstName]
View 11 Replies
View Related
Feb 21, 2005
I have a search form, that can be opened by both my "product_enquiry" and my "edit_product" form.
When you select a value on the product search form, i want it to open another form at a specific record.
Easy you might think, but what If i want it to work out which form to open.
So if: A button on Edit product was clicked on to open product search, the value found in product search should be loaded into edit product.
But if it was a button on product enquiry, the record should be opened on the product enquiry form.
Can anyone help?
View 3 Replies
View Related
Aug 23, 2006
Hi
I have a form, with 2 Combo Box's and a List Box. The Combo Box's provide a search criteria and the results are displayed in the list box [searchList].
I want to be able to double click a record in this List box [searchList] and that will open a from [frm_SearchDisplay] with the selected record from that List Box [searchList]
Can someone please point me in the right direction.
Thanks in Advance
H
View 2 Replies
View Related
Oct 12, 2006
Can someone please help !!
I have a table with four 'Yes/No' fields.
I have four forms (each form 'relates' to one of the 'Yes/No' fields) and contains additioanl information to be completed.
When I create a new record in my database I tick one, two three or all four of the 'Yes/No' fields.
I would like some VBA code that will automatically open the relevant form (depending on wether the 'Yes/No' box has been ticked) when I click a button.
Many thanks.
View 1 Replies
View Related
Apr 19, 2015
How do I reference a subform DS field to open up a tabbed form on another subform.
Here's what I have.
field one on the Sub DS opens up tab one on another form, as does field two on DS open tab two on another form.
but..
how can I click on "any" field on the DS, run an IF statement, and it checks if that record on the Datasheet, contains information in regards to, IF field one OR field two contains any data, and opens the tabbed form respectively on the other form?
View 3 Replies
View Related
May 16, 2014
Basically I have a database that records commitments for clients. The user can go a client form, and within that form there is a subform which shows each expenditure commitment for that person (wihtin the subform there is also another subform that shows all income attached to each commitment). The user can use the Next and Previous buttons to navigate through the expenditure commitments (and the same if they want to navigate through the income commtiments within each expenditure commitment).
If you double click on any specific commitment whithin any part of the subform, then the expenditure commitment form (or the income commitment form if it is an income one) opens to allow the user to change stuff.
My database is set up so that each time a form opens the previous form closes. So when the user has the commitment form open and clicks close, the client form will re-open. My issue is that is always goes back to showing the very first commitment and the user then has to navigate back through till they find the one they have just updated.
What I would like to be able to do is when the user closes the commitment for that the client then the form opens up with the specific subform on the screen that they have just changed.The code I currently have written on the Close command of the Commitment is as follows:
Code:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmTotalCommitmentsbyClient
stLinkCriteria = "[FrameworkID]='" & Me![FrameworkID] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "frmCommitments"
I essentialy just need the bit that would also say show the subform (which is called subfrmComms2) where the commitmentID = the commitment ID on the Commitment form.Now just to really complicate matters, I would also like this to happen if someone has the Income Commtiment form open and they close it, only the Income Commitment subform is actualy a subform of subfrmComms2 (above), but equally the income commitment form has within it the Expenditure ID, the Income ID and the FrameworkID.
View 3 Replies
View Related
Dec 16, 2013
I have a form containing company records. In a subform I have contact records for individuals in each company.
Each of those individuals has a child table for adding contact notes (telephone, email). I want to add a button to the subform to open a new, separate form so I am able to add notes.
I used the wizard to create a link button but I get
Code:
Syntax error in query expression
So does Access assume the button is opening from a form rather than a subform or does it not matter? Is there something I need to change to the following code?
Code:
stDocName = "Form_Companies_Notes"
stLinkCriteria = "[Company_contact_ID]=" & Me![Company_contact_ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
View 3 Replies
View Related
May 3, 2013
I'm working on the Navigation Form template in Access 2010, which is new to me. It appears that one needs to use the BrowseTo command to open up a form in the built-in subform module. I'm trying to create a couple of buttons where each button opens a form in a different data mode; one in read-only and one in add mode. Here is the syntax I used for read-only:
DoCmd.BrowseTo acBrowseToForm, "frmSales","frmNavigation.NavigationSubform", , ,acFormReadOnly
frmSales is the Sales form I want both of the buttons to open and frmNavigation is the Navigation form. It seems to be ignoring the data mode part at the end however. It only will open in Edit mode. Is there something I'm doing wrong with this command?
View 3 Replies
View Related
Sep 7, 2013
I have a [Order Central table] that compiles products from four different categories that employees can order from.
Employees using the database will select from four categories on buttons which opens up the order form EX: [Category 1 form].
They enter their order info on [Category 1 form] into a subform sourced from [Category 1 Table] called [Category 1 subform].
Is there a way that they could select the "Category 1" button, which would run a macro opening [Category 1 form] with the [Category 1 subform] having a where condition of 1=0 (or just so that the subform appears blank)?
View 7 Replies
View Related
Aug 6, 2014
I need to open up a form to specific records in its subform based on user input from combo boxes (Customer and/or PKGEngineer). The two combo boxes are on a switchboard. How can this be done?
Using:
Win 7
Access 2010
View 14 Replies
View Related
Aug 21, 2014
I am creating a database to manage multiple mobile devices. The table structure is complete and I'm trying to build a set of forms.
Simplifying things, I have tblUser, tblSim and tblDevice. I also have a tblJoin where you can select a UserID, SimID and DeviceID to create an item of inventory.
I have created a parent form (frmCreateInventory) base on tblJoin, so it has JoinID and combo boxes for UserID, SimID and DeviceID in the lefthand side.
I have also set up 3 sub forms sfrmUser, sfrmDevice and sfrmSim, based on their respective tables, which I want to display on the right hand side of frmCreateInventory.
I'd like to be able to create a subform control in frmCreateInventory, but change the subform it displays based on what combo box is clicked, e.g. if I click the UserID control, the subform displays sfrmUser, and the relevant data based on the UserID that is linked to the JoinID. if I click the DeviceID control, the sfrmDevice is displayed and the relevant info etc. etc.
Is this possible? if so, how would I go about doing this?
View 6 Replies
View Related
Oct 23, 2014
I'm trying to open a form with a subform from a separate form. I've never had any issue before, but all of the sudden, the subform doesn't seem to open immediately. I get the error
Code:
Method 'Form' of object '_SubForm' failed.
After that, it opens (subform and all), but some calculated text fields just say "#Name?#"
The only thing I did today was add a command button to that subform.
When I try opening the form (or subform) from the navigation pane, I get
Code:
The expression On Current you entered as the event property setting produced the following error:
A problem occurred while Contracts was communicating with the OLE server or ActiveX Control
When I step through the code, it doesn't reach the On Current event.
View 5 Replies
View Related
Apr 3, 2014
I have a Project form, which holds StockArtProduction_Subform in datasheet view. I need for them to be able to click on the ID in the StockArtProduction_Subform datasheet and it open a single view form (StockArtProduction) with the correlating ID.
Ideally, it would also work for new entries in the StockArtProduction_Subform, but the StockArtProduction form would have to "auto populate" (did I use it right?) with the ID of the currently open Project form.
View 14 Replies
View Related
Jun 16, 2015
I have a subform 2SiteList (Datasheet View) with the field SiteName... i also have another form SiteDetails.
if possible i would like to be able to double click on a SiteName on the subform and have the SiteDetails form to open to show the full details.
View 1 Replies
View Related
Feb 20, 2012
I am new to Access 2007 and I am having trouble in creating a form. It is simply a data storage table which would be fed in by users. That it.
I need to create a user friendly form so that :
When the user selects : Career_Goal field as "None", the next field called: Years, should be automatically be populated as 0.
In any other case, they should be able to select the years from the dropdown list.
How do I create this if else conditions? Do I use expression builder, if yes then how?
View 1 Replies
View Related
Jun 6, 2013
I have one table containing name of restaurant with its address etc. Then i created another table to list out the restaurant workers names and details. Just as an example,
Table:Restaurant
Restaurant name
Address line 1
Address line 2
Restaurant #
Website
Table:StaffContact
Staff Role
Name
speciality
email
phone
I have the main form that has all the restaurant details only. And i have another form containing the Staff information. Please note the two table have a relation and it works well.
Now to make it user friendly(basically easier for the lazy ones), I dragged the staff contact form on to my main form and displayed it as a datasheet(basically a sub form).
Now, my boss does not want users to add/delete on this sub form(datasheet). So,he wants me to create buttons to open new record of staff for each restaurant(new form)
My issue is with opening a new record to enter a new person to the staff list and give them a role as well in form view.The new form has
So i ran a Macro, with open form with Where condition
Code:
[Staffcontact]![Rest Name]=[Forms]![MainForm]![RestaurantName]
But, it does not work .
View 2 Replies
View Related
Mar 18, 2014
In the database, there is a table called "Jobs" which sales enquiries are entered into. In this table, there are fields called "JobStatus" which has the default text of "Quotation Pending" and a combo box "JobLive" which is a "yes/no" field. Normally a job will come in as quotation request and the "JobsLive" field will be set to "no".
Occasionally, a job will come in as confirmed from the outset. In this case, the job will be marked as "live" in the combo box "JobLive". Is it possible to change the "JobStatus" field to "Job Live" when this combo box is changed to "yes"?At any other stage, the "JobStatus" field will be changed using an update query as and when changes are made.
View 11 Replies
View Related
Sep 24, 2013
I have this code that should change backgroundcolor in multiple items form based on a value of a field:
Private Sub Form_Current()
'check if field on form called somefield is DVD
If Me.TYPE.Value = "DVD" Then
Detail.BackColor = vbRed 'DVD
Else
Detail.BackColor = 16777215 'BOOK
End If
End Sub
But it does not work, what can I do?
View 1 Replies
View Related
Aug 22, 2013
how to write code to open a second form on the click of a button on the first form and specifically to continue on the record set I am focusing on.
I have 2 tables. The first is tblAccount (fields: AccountID [the PK]; AccountHolder) and the 2nd is tblUser (fields: UserID [the PK]; UserName; AccountID). They are linked so that one account can have multiple users. Each has a respective form; frmAccount and frmUser.
My goal is that once the AccountHolder field has been populated in frmAccount I can click a button to open frmUser with the AccountID field already showing in the form header.
I have managed to do something similar by selecting from a combo box before but I am having trouble making this work after directly populating the AccountHolder field and using an open Form button.
View 2 Replies
View Related
Apr 15, 2013
I have a form with numerous fields on it, with the one I'm concerned about being a date field.
I want a different form to open automatically if the above date field is in the past (this will act as a warning to the user).
I've created the warning form as a pop-up view but just want to know the best way to have it open automatically.
Can this be done via a macro in the OnOpen Property (or maybe OnLoad) or will this have to written in vba.
View 7 Replies
View Related
Jan 9, 2014
I have a box with age in called [agecalc]. I want to change the border of the box to red to indicate they are a Juvenile if under the age of 17.I already have some code to write the text, I just need to change the border of this text box called agebox
=IIf([agecalc]<=17,"Juvenile!!")
View 1 Replies
View Related
Jan 28, 2014
I have a form which has a combobox where the user selects a record from another table,I want to hide the forms fields [managercontact] and [managertelno] depending on the value of the combobox (manager) from the table details, but its not the value shown in the combobox its the value of another field [type] from the same table called details. Its one of two values being 'conc' or 'ob'.
View 2 Replies
View Related
Jul 18, 2013
How can I get the value from a field in one table (in the sub form) to copy/insert into a field in another table (in the main form) when adding a new record?The main form and sub form are linked using parent/child linking, and the sub form is in a tab.I have table A (Visit Dates) in the main form which is used to record the date of a visit to a church. Table B (Quarters and Peals) is used to record an event that took place at that church during that visit. Note that not all visits in table A require a record to be created in table B - but half or more do.
In tables A and B I have a field called "QuarterOrPealID" and these are both primary keys, though the field in table B is set to 'no duplicates' and in table A it's set to 'duplicates allowed', as table A has its own auto number/pk. They are both linked in the relationships.
So, when I add a new record to table A using the main form, I might then need to click on the tab in the sub form to create a new record in table B, which has to be linked to the same record in table A. When the "QuarterOrPealID" auto number/pk is generated in the sub form (table B), I need that value to update to the "QuarterOrPealID" field of the main form (table A), so that when I'm viewing these records the form pulls all the information nicely together.
View 10 Replies
View Related