Forms :: Open Blank Form Based On Value In Text Field In Main Form

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 Replies


ADVERTISEMENT

Forms :: Blank Textbox When Subform Updates Main Form

May 15, 2014

I have a subform with a textbox in the footer to count[id]. then on my main form i have another textbox that has a control source of =[subform].[form]![subformfootercontrol].

However when the subform updates the main form text is blank. typically i see a ?#Name or#Error if the control is pointing to the wrong place, but i have never see it stay blank.

View 3 Replies View Related

Forms :: Button In Form To Open Different Form And Chose A Customer Based On Last Form

Mar 26, 2013

Basically I have a Customer Form, which I have a New party button on it,this button opens up the party form to a new party, what I would like it to do is open up a new party but make the new party for the customer I had selected in the previous form.I have tried the GoTo macro's but cannot seem to get it to work.

I am thinking on clicking the button it will need to get the Customer ID, and then open the party form, create new party, and paste in the Customer ID, which then updates the Name - Date - Address - Company Fields.

View 5 Replies View Related

Forms :: Using OnClick Event To Open Query Text Displayed In Form Field?

Oct 10, 2013

I have a table that holds the SQL texts for ca. 1000 Select queries (mostly minor variants that are used to programmatically swap out RowSource strings for combo boxes). I'd like to have a quick and easy way to open/review/modify these queries.

One strategy would be to display the SQL strings in a field on a Datasheet form, then use an onClick event on a text box linked to the SQL-holding field (or perhaps an onClick event tied to an unbound text box on the form) to open the associated query. That would allow me to view the SQL of the query that I want to open, allow me to quickly scroll through the list of stored SQL texts, and give me options for sorting or limiting the SQL-texts displayed in the datasheet form.

But, I can't seem to get the onClick event to work. The problem seems to be that I can't figure out how to pass the SQL string contained in the field to a function that will use that string to open the query .

View 10 Replies View Related

Forms :: Open A Subforms In Main Form

Sep 6, 2014

I have a main form with a combo which lists all forms in my database. There is also a button which open all the forms depending on this which I will choose from my combo.

Private Sub Command2_Click()
DoCmd.OpenForm Me.cmbforms
End Sub

Is there any way to open the forms in a subform in my main form?

View 5 Replies View Related

Forms :: Open A Form Which Contains A Subform With Blank Fields?

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

Forms :: Display Row Text From Subform Column In Unbound Text Box Of Main Form

Jan 6, 2014

My database has Main form and a Sub form. On main form i place one unbound text box named investigations. In subform of which datasheet there is a column named TestCode. I want unbound text box (Investigations) to display row values which selected in a column (TestCode) of subform.for example:Investigation field should display "CBC,HB,ALP".

View 5 Replies View Related

Form Based On Queries - Deleting Field From Main Table

Mar 28, 2014

In my Access2000 db, I have a table, on which many different queries are based. Many forms are based on those queries. I want to delete some redundant fields from the table. I tried deleting one, but I found I could no longer open any of the associated queries and forms. Is there a simple way to delete table fields so that it doesn't stop me from opening associated queries and forms? (There are hundreds of them, and I have a lot of table fields that I want to delete).

View 1 Replies View Related

Forms :: Main Form With 2 Subforms Fails To Open Current Record

May 12, 2014

I have a main form "frmDriverNoticeRecord" with 2 subforms, "frmSubDriverNotice" and "frmSubVehicleRecord"..The main form uses "IncidentID" as the PK. Each form stores data in its own table. The tables are related via IncidentID and there is a 1-many relationship between tblIncident (main) and tblDN (sub) and tblVehicle (sub).

I have a form "frmIncidentLog" displaying records in a table view with a few fields for quick reference and to allow selection of a single record for detailed viewing. I created a command button with the intent to open the "frmDriverNoticeRecord" at the current record. The main form and child link fields appear to be linked correctly; i.e. IncidentID on all three. If I open the form manually it opens and I can use it and search and filter as I want. If I try to open it via the command button It opens a small window asking for the IncidenID, when I enter theIncidentID number, it opens the form to the first record every time.Here is the code:

Private Sub comOpenDR_Click()

Dim frmName As String
Dim recID As String
frmName = "frmDriverNoticeRecord"
recID = "[IncidentID]=" & Me![IncidentID]
DoCmd.OpenForm frmName, , , recID
End Sub

I tried running the the DoCmd.OpenForm command directly from the button using the where condition (in various manners) with the same results.

View 13 Replies View Related

Forms :: Open A Form Based On Current Form?

Nov 23, 2014

When I have a form called "SiteForm" open and click a button "NewCalloutButton" I would like it to open up a form called "CalloutFormEntry"

I've done this using

Private Sub cmdOpenDetail_Click()
DoCmd.OpenForm "CalloutFormEntry", , , "CalloutID = " & Me!CalloutID
End Sub

However this brings up all the records linked to the calloutID

What I'm after is to open the CalloutFormEntry from the SiteForm in a dataentry kind of format but to carry over the current SiteID based on which site is open on the SiteForm. That way there's no user error logging callouts to incorrect sites.

View 9 Replies View Related

Forms :: Based On Main Form ID Subform Data Should Be Shown

Mar 19, 2013

I have form where I will show the details of one table(member details table). In same form I have subform where I can get the member family details (here I am using the relationship table), now my problem is when Member detail form open based on the member id, the below subform data should be fetched...

View 6 Replies View Related

Forms :: Check All Records In A Subform Based On CBO Of Main Form

Jun 28, 2015

I have a form with 22 subforms (in about 11 tabs). Each one of these subforms has a controlling field in the main form (table) that dictates if the associated subform needs to comply with data entry rules or not.

For example:
Field in main form cboMed (Yes; No)
Subform: frmSubMeds has a list of medications

I want to be able to loop through all the records of the subform and determine if they are complete.

This check is run from a command button; that should also consider the value in the combo box. i.e. Check only if the combo has a value of "Yes"

Since i have 22 subforms and have to run the check on everyone of them, i have used the tag property to check if the record is blank or not. This is what i have so far

Code:
For Each ctl In Me.Controls
Select Case ctl.Properties("ControlType")
Case acSubform ' only look for subforms
If ctl.Enabled Then
If Not (IsNull(ctl.Properties("SourceObject"))) Then 'if it is a subform type

[Code] ....

The problem with this is that it only looks for the selected record in the subform and doesnt look for ALL the records.

View 5 Replies View Related

Forms :: Continuous Subform Based On Same Table As Main Form

Jul 4, 2013

i'm creating a database which holds all animals. i'm trying to make the parents selectable in a subform based on the same table as the main form - this doesn't work for whatever reason ("table is already opened exclusively by another user,..."). it can't just be one field or a query, it needs to be a subform because besides name and eartag i also want to display a small picture of the parent and only the filename is being stored.

i'd really like it to be selectable records in a continuous subform, so the risk of selecting a wrong id is minimized. is there a way around this not being able to use the same table for a subform?

View 14 Replies View Related

Forms :: Way To Continue To Blank Form After Entering Information Into Previous Blank Form?

Mar 25, 2013

When entering information into a blank form, I would like to be able to continue entering information to another additional blank form after my last entry. Is there a way to continue to a blank form after entering information into the previous blank form? I would just like to continue without having to close the entire form and then reopening another form.

View 7 Replies View Related

Forms :: Default Entry Into Subform Based On Data Entered In Main Form

Apr 23, 2014

I have a form that request the User to enter a Parcel ID number (99-9a-99-99aaa-aaa-aaaa). The sub form asks for the subdivision number, block number, and lot number. The subdivision number, block number and lot number are normally part of the Parcel ID number but sometimes they can be different. I want the sub form to fill in the Subdivision number, block number, and lot number as a default but allow the user to change the value if needed. currently the sub form will only show what is entered into the table itself if a change is made on the main form the sub form does not reflect the change.

View 3 Replies View Related

Forms :: Display Subform Records On Main Form As Text

Jun 28, 2014

I have a form with a subform in it. The Subform relates to a junction table.

For each record on the main form, there may be more than one record on the subform. The Subform only has one field on it (a combobox).

What I want to be able to do is have a text box on the main form that shows a concatenated list of all of the records on the subform.

For example, if I have 2 subform records, 'Yellow' and 'Blue', I want a textbox on the main form record to show 'Yellow, Blue'.

I have tried so many things I have found online (over about 5 hours, including a module called ConcatRelated) and absolutely nothing works!

View 5 Replies View Related

Use Hyperlink To Open Form Based On Value In The Field?

Jun 12, 2014

I have a continuous form that lists all unapproved invoices. I would like to have a hyperlink at the end of each row that says Review and will open another form that queries the details of the unapproved invoice based on the invoice number in the current row.

View 9 Replies View Related

Sort Subform Records On Numeric Values Stored In A Text Field On Main Form

Sep 25, 2015

I have developed a database but have had difficulty with sorting data within subform of a main form. The subform displays the related tasks that correspond with main form that has been selected. Within the main form I have also created a text field that defines a particular sorting sequence of the tasks found within the subform which is titled Task Sequence. What I would like to do, is use the Task Sequence field to sort the order of tasks within subform. I have tried: IIf([ID] Is Null, 0, Val([Task Sequence])) within the Advanced filter/sort but either it shows only the first task defined in the Task Sequence or it wants to filter the main form and not the subform.

View 14 Replies View Related

Forms :: Filter Second Form Based On Text Box In First Form

Apr 30, 2014

I have a button that opens a second form and filters that form based on a text box on the first form(which remains open). the problem is that it does not filter the second form unless the second form is already loaded for some reason.

For example if i click on the button it opens the form Unfiltered then i go back to the previous form without closing the first form, click the button again and it is then filtered .

I attached the screen shot of the macro for the button and there are no other events on the second form.

View 5 Replies View Related

Forms :: Open Another Form Based On ID If No Records

Apr 9, 2015

I'm working on a database for residents at a care home. I've just started and I want to automate a process where I can click a button and see the contact details of a GP. It's all working but I want it to be that if the resident has no GP it will open a form so you can choose a GP. I have a message box to tell the that the resident has no GP and it takes them to the relevant form but I need it to be based on the correct residents ID and it is not. I have the code running on form load. I have attached a zipped version of the database (it is safe I promise)

View 5 Replies View Related

Browse And Open Folder Based On Matching Form Field

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

If Subform Is Blank, Dont Show Main Form..

Oct 4, 2006

My title is a little confusing, i have a form with a subform, what I want it to do is this say i have 10 records, 3 of which are missing any data in the subform... then when i show the form it only shows 7 records. This way all records have data in both the main form and the subform... is this possible?

Thanks

View 1 Replies View Related

Need Code To Open TeacherDetailFrm Form Main Form.

Jun 11, 2007

Hi
I need code to open TeacherDetailFrm form Main form.

I have TeacherStudentSubFr*m on the Mainform, FirstNameTxt on the TeacherStudentSubFr*m, and TeacherDetailFrm.
I need code to open the TeacherDetailFrm By double click on the FirstNameTxt.

I use this code but no data come and query dialog box come.

Private Sub FirstNameTxt_DblCli*ck(Cancel As Integer)
Dim DocSubForm As String
Dim DocText As String
DocSubForm = "TeacherDetailFrm"
'DocText = "[Result]=" & "'" & Me![result] & "'"
DoCmd.OpenForm DocSubForm, , , "[ FirstNameFld ]=forms![TeacherStudentSubFrm]![ FirstNameTxt]"

End Sub


I like to upload the file but no way in this forum

View 2 Replies View Related

Forms :: Copy Value From Field In Subform To Field In Main Form During Data Entry

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

Forms :: Move Focus From Last Field Of Subform To Another Field On Main Form

Aug 19, 2015

I am currently stuck on set focus property. I have a main from with nested subform. I am trying to move the focus from last field of the subform to another field on the main form.

Customers(mfrm)....>Addresses(sfrm)...>Orders(sfrm Add)......>OrdDetails(sfrmOrders)

Now I have a field name [Securedesign] in frmOrderdetails and I want the tab order to navigate to field [CustomerID] in frmAddresses which is a subform to frmCustomers.

View 2 Replies View Related

Forms :: Recalculate Field On Main Form

Feb 17, 2014

I have a form with a subform. The main(parent) form is called Quotations and the subform is called QUOT_DET. On the subform I have two fields bound to a table. The fields are QTY and Price. On the main form I have a field called QUOT_TOTAL which basically is bound to the Quotations table. Through On Afterupdate on the subform I refresh this total on the main form. The problem I have is that I want this field (QUOT_TOTAL) of the parent form to immediately refresh/requery etc when a user changes the QTY on the subform. The QTY is the first column of the subform. The QUOT_TOTAL only refreshes when I reach the end of the row. I do not want that - I want it to refresh immediately after the user changes the value of the QTY field and the Price field.

View 3 Replies View Related







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