Changing A Main Form
Dec 5, 2006
I have a Main form with a number of tabbed subforms. I want the main form to show a list of records entered that the user can scroll through. When I change it to continuous forms it give a message saying it cant be changed as it contains a subform, an activex control or a bound chart. The main form is linked to the tabbed subforms to allow the user to see full detail of the records associated with the main form.
View Replies
ADVERTISEMENT
Jun 24, 2015
I have a database with a Main Menu Form, containing a Button that loads my main data entry form. When the Button is Clicked portions of the data entry form that is loading shows through the Main Form Background (e.g. portions of the navigation bars, and portions of the boarder on the form that is loading.)
View 5 Replies
View Related
Dec 1, 2005
I have a subform which makes a change to a field on the main form. When focus is returned to the main form, the BeforeUpdate and AfterUpdate events fire. Why? I thought from the form's perspective, the subform is just another control.
BTW, I get the same behavior if I modify the field from within the Exit event of the subform control.
In either case, the main form's Dirty event is NOT triggered.
View 2 Replies
View Related
Aug 27, 2014
On the form: User enters first name, then last name. Upon updating the last name field, I would like another form to pop-up and display all the people with that same first name and last name that the user just entered.
On the pop-up form: All of the matching first names/last names are listed with a button control beside each record that says 'Select'. The user clicks the select button beside the record he/she wants. This pop-up form closes and all of the data from this selected record is now showing on the original form.
So far, I have a query/form that pops up only showing the matching first/last names. I'm having a hard time getting my original form to auto-populate with that record that the user selects on the pop-up.
(Also my main form is actually a sub-sub form - so in my trials I could've been massacring my syntax trying to point to it.)
View 5 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
Jul 24, 2013
I have a form, which is comprised of a sub form, and some of the text box controls sided with a button, and the event had been written to the button.
Now, to give a note on how had the sub form had been created is firstly taking a clone of the "Payments" table and using it as a datasheet, and then create a sub form in the form, it works fine
View 2 Replies
View Related
Nov 28, 2013
I have a main form (tsTimeSheetMain) which contains a sub form (tsTimeSheetDataNewSub) in data sheet view. When I click off one row onto another row in the sub form, it triggers this code:
Forms!tsTimeSheetMain!ProjectMonSum.Requery
i.e. it tries to requery the ProjectMonSum field (on the main form) which is a dsum calculated field. This works fine and updates the ProjectMonSum field (which dsums values from the same datasource as the subform.
However, this seems to put the cursor back to the top left field in the subform (datasheet view), rather than leave it in the field I click on (in the subform).
Why is this happening and what is a decent workaround this issue? I just want to update the calculated dsum field each time you update values in the subform.
View 8 Replies
View Related
Apr 11, 2005
I have one main form with 3 tabulated sub forms.
My main form consists of two fields.
When the user clicks tab 2 (subform 2) or tab 3 (subform 3) the main fields should hide
I tried to achieve this by using the on click event at the tabbed forms. I referenced the two main fields and used the visible property followed by a form requery. It didn't work.
thanks in advance
View 1 Replies
View Related
Aug 25, 2005
Hi all,
I've added a message box to what is basically a standard simple to use access control, "closeForm", I'm a newbie working on learning access vb. I'm guessing my code if fudged. Any help is greatly appreciated.
Private Sub Close_Click()
On Error GoTo Err_Close_Click
Dim Answer As Integer
Answer = MsgBox("Press Ok to Close, Cancel to Continue.", vbOKCancel + vbQuestion, "Exit Data Entry?")
If vbOK Then DoCmd.Close
Exit_Close_Click:
Exit Sub
Err_Close_Click:
MsgBox Err.Description
Resume Exit_Close_Click
End Sub
Thanks to all in advance
View 5 Replies
View Related
Sep 2, 2006
I'm not sure how to search on this, even in the advanced search. If this has been answered, could you point me in the right direction?
I have a main form AddNewCompany (the infamous tab control that now works - thanks to your combined efforts). On it I have a command button that pops up a form of continuous forms with all the companies in the table (the query calls the CompanyID and CompanyName fields only). I have attached an image of the interface.
This means the user can see if the company already exists and doesn't enter it again. (I'm sure there are more effecient ways of doing this, but this is simple and it works. I also know key fields should be autonumbers instead of text, but I have reasons for doing it this way).
What I would like to be able to do is click on the CompanyID field and have the companies information show up in the main form.
View 14 Replies
View Related
Sep 4, 2006
Can anyone see what I am doing wrong?
I have a main form that has a tab control on it. The main form is called frm_AddNewCompanyContacts. It is opened in edit mode. To see if a company exists I use a command button to call a popup form with a list of all companies' IDs and names. I then want the user to be able to click on a commad button on the popup form to take the main form to that record. After an intial post, and subsequent search, I found the appropriate code. This is what I am using for the onclick event of the command button on the popup form:
Private Sub cmdGoToCompany_Click()
Dim rst As Recordset
Set rst = Forms![frm_AddNewCompanyContacts].RecordsetClone
rst.FindFirst "[CompanyID]='" & Me![CompanyID] & "'"
If rst.NoMatch = False Then
Forms![frm_AddNewCompanyContacts].Bookmark = rst.Bookmark
End If
End Sub
When I click on the command button I get an error message:
"The expression On Click you entered as the even property setting produced the following error: A problem occurred while Microsoft Office Access was communication with OLE server or ActiveX Control (I don't have an ActiveX Control).
*The expression may not result in the name of a macro, the name of a user-defined function, or [Even Procedure].
*There may have ben an error evaluating the function, event or macro."
View 10 Replies
View Related
Nov 13, 2004
I'm trying to sum up the hours of a sub-form on the main form. I've followed the instructions in Access Help so far. I've created a text box in the footer of the sub form with the following control source:
=Sum([Mon])
which should sum up all the hours in HoursMon fileds.
Then I've created a text box on the main form with the following code in the Control Source
=[frmTshtProj Subform]!SumMon
But it doesn't work. I get a #Name? appear in the box instead of a total. Any ideas?
Thanks in advance
S
View 6 Replies
View Related
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
Jan 23, 2015
I have a 'main' table with a Project_Number that links all the data in my db together. I have another table that uses that Project_Number as a lookup field to connect that tables data to the main data. I created a 'main' form that has the ability to enter data for the 'main' table. I want to be able to press a button and have the second tables form pop up and add that that specific Project_Number. I added the button and went through the wizard process. I then added the linking info through the builder. It works fine if there is already data entered for the project_number in that specific field. but if the field is empty, the popup window doesn't recognize a project_number and doesn't add it to that record. below is what I am using. The project_number in the 'main' table is text and the Project_Number in the 2nd table in a number since it is a lookup field.
Private Sub CongressionalDistrictCmd_Click()
On Error GoTo Err_CongressionalDistrictCmd_Click
Dim stDocName As String
[Code]....
View 9 Replies
View Related
Nov 23, 2013
So I have made all the necessary forms to start working with my Access, and now I need a main form, a home where I should put all the buttons to enter each form.I have used the Navigation Control on a New form URL...
A row with buttons appeared, and I complete the property: Navigation Target Name with the target form, but it is giving me some trouble with a searchForm and a Query. Every time I enter this form (using nav control), Query asks for an Input.
View 2 Replies
View Related
Mar 22, 2013
I have converted an old Access 97 database to Access 2010. Mostly it works fine but I have a major issue with the invoicing forms. It was working in the old database but I cannot get it to work in this version.
I have the usual invoicing option where the lines of the invoice are displayed in a sub form for that customer and line totals calculated. This works fine. I have a sub form total text box in the footer of the sub form which I want to pick up from the main form so that I can add the delivery charge and VAT.
View 6 Replies
View Related
Dec 20, 2011
I'm working on a project that has two tables. "Calls" and "Customers". The Customers form has a subform, "Calls Subform" in it. When you click on the (New) Hyperlink a new form opens, "Call Details". I would like to pull information off of the "Customers" Form and insert it into the newly opened "Call Details" form.
Problem #1) Home Phone (named "Phone" and Text223 (named "CID"): are both bound controls so I have to do this in an OpenArgs type process.
Further details:
On "Customers" the following is true:
"25" is the "ID" for that customer on the "customers" table
"Home Phone" is the home phone number on the "Customers" table
On Call Details the following is true:
Home Phone is Bound to a table "Calls" and needs to pull it's data from Customers Form..Text223 is CID and bound to the table "Calls" and needs to pull it's data from "Customers" form.
View 14 Replies
View Related
Jan 24, 2012
I have a main form where information for a particular part number or job is entered. Should the part number not yet exist, Access will let you know. I have a button within the main form that opens up the Form_EnterPartNumber form which allows you to enter the new part number.
What I would hope to be able to do would be to refresh (requery?) the main form after creating a new part number and closing the Form_EnterPartNumber form..........but, keep the main form on the current record instead of resetting back to record number 1.
Is this possible?
View 1 Replies
View Related
Nov 17, 2005
Hi
Appreciate your help in advance.
The db is related around timecards.
I have a tblcompany & tbl employee, these are not linked (maybe they should be) but tblcompany is linked to tbltimecard. Tbl timecard is linked to tbltimecardhrs and tblemployee is linked to tbltimecardhrs.
Now tbltimecard is used to create the main form and tbltimecardhrs is used for the subform (datasheet).
I select the company on the mainform but the employee in the subform and i would to filter only employees who work for the company in the main form.
Now i have written this it only makes sense (i have to for it to work) to link the company and employee tables but i am not sure how to link them so they link back in to the forms, once the link is done correctly I suppose it just a matter of cascading combobox, which i should be able to manage.
Thanks again
View 6 Replies
View Related
Nov 12, 2006
The situation is like this:
I am designing a db for a dental clinic. I created 3 tables as follows:
1.T_Patients (P_Code(PK) and other fields)
2.T_Diagnosis (P_Code(Fk), ToothRecId (PK) and 32 text fields for 32 tooth named (UR1 to UR8, UL1- UL8 for Upper left / right Arch and LR1 to LR8, LL1 to LL8 for Lower left / right Arch)
3.T_Pmts (P_Code (FK), PmtRecId(PK) and other fields
I created one main form based on T_Patients tbl and similarly another 2 forms from other 2 tables. In the main form I placed 1 sub-form and 2nd sub-form. Bothe the sub-forms are Master / Child relationship on form over P_Code field in the main form.
Single character length has used for all the 32 text fields in table T_Diagnosis. So only one single B, C, D, F, M could be entered.
Normally we search patient’s profile by patient’s code or by name that displays in the main form. But the client needs to search patient’s record by tooth criteria.
There may many tooth fields in the first sub-form that are null and only some of them with any one of the B, C, D, F, M character. Bcz there is very rare chances of damaging all 32 tooth of the patient.
Now my clients want to search based on the data which are B, C, D, F, M characters. Means once he types C (stands for Cavity) in a search text box then it should bring all the sub-form records that hold value C in any of the 32 fields.
1.How can I do this when the search based on SUB-FORM and not over the main form?
2.The entered criteria value might by in other field also. Like say if entered C then this value may be in any of the 32 fields. So how it would bring all records?
I am confused how to do it. I attached a pic of my form for your ready ref. :confused:
I would really appreciate if somebody could help me.
With kind regards,
Ashfaque
View 3 Replies
View Related
Jun 9, 2006
I have a form (called DeliverableDescription ) that has the following buttons: close, and save
the main from has a sub form (called DeliverableDescriptionsubform) that is viewed as a datasheet
also I have a table called DeliverableDescription that has three columns (outline number, name, and group number)
the DeliverableDescriptionsubformshows data from DeliverableDescription (only the outline number and name)
this DeliverableDescriptionsubform is used to update the DeliverableDescription table (through copy and paste from another source)
what I need to do is populate the group number column when the DeliverableDescriptionsubform is updated
the group number is just the first part of the outline number (i.e. if the outline number is 20.45.35.1.4.9 then the group number is 20)
I want to create a command in the save button that takes the string value of each item in outline number column and do some simple string manipulation to it then populate the group number
my approach is to have a select query that gives me all the outline number then through a loop iterate through each one, performing the string manipulation and update to the table.
my question is how to access elements in a sub form, since the save button is in the main DeliverableDescription form
also is there a better way to do this?
thanks for any help you might be able to offer.
Code:Dim ws As WorkspaceDim db As DatabaseDim rs As RecordsetDim OutlineNum As StringDim queryResult As StringDim returnResult As StringDim SearchChar As StringDim Pos1 As IntegerDim TotalLen As Integer OutlineNum = "SELECT DeliverableDescription.OutlineNumber " & _ "FROM DeliverableDescription " Set ws = DBEngine.Workspaces(0) Set db = ws.OpenDatabase("N:statusReport_Test.mdb") Set rs = db.OpenRecordset(OutlineNum) Do While Not rs.EOF queryResult = rs.Fields(0) TotalLen = Len(queryResult) SearchChar = "." Pos1 = InStr(queryResult, SearchChar) returnResult = Left(queryResult, Pos1 - 1) DoCmd.RunSQL ("Update DeliverableDescription SET DeliverableDescription.TeamLeadNumber = returnResult " & _ "WHERE DeliverableDescription.OutlineNumber = OutlineNum ;") queryResult = "" SearchChar = "" Pos1 = 0 rs.MoveNext If rs.EOF Then Exit Do End If Loop DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
View 2 Replies
View Related
Aug 11, 2014
I have a database that tracks workorders and then the associated invoices that result froma workorder. The process is that the user creates a workorder and when an invoice related to the workorder comes in, they register the invoice and select the workorder it belongs to.I have a form (DFRM_PayrollWorkorders) that allows the user to display the workorder. This form contains a sub form DFRM_PayrollInvoices_Summary that displays any invoices that have been registered against the workorder id. Sample screen attached. In the sub form, I have added two expressions ,
=Count([InvoiceNumber]) and =Sum([InvoiceValueTotal]).
In the work order form I have added two expressions, =[DTBL_PayrollInvoices_Summary].[Form]![Invoice_Count] and =[DTBL_PayrollInvoices_Summary].[Form]![Invoice_Sum].
The above simply displays the total invoice count and total invoice amount for any invoices associated with the work order being dsiplayed on screen.
My issue is, whenever there are no invoices for the work order, I get #Error in the =[DTBL_PayrollInvoices_Summary].[Form]![Invoice_Count] and =[DTBL_PayrollInvoices_Summary].[Form]![Invoice_Sum] expressions.
Ideally, I'd just like the count and sum expressions to show blank or 0.
View 2 Replies
View Related
Apr 12, 2005
hi
i have a stock control db. when new stock is ordered it updates 'units on orders' field, then when goods are recieved the subform field is updated and this automatically updates the 'units on hand field'.
i then have another subform for stock going in and out, i would like to be able to have the units on hand field as above (which is the main form) automatically updated like is when using the the goods recieved sub form??
not sure if i explained it properly but i can send the structure if that helps?
many thanks
View 1 Replies
View Related
May 11, 2005
Hi
I have a sub form and a button on the main form that needs to be pressed to refresh the data in the main form after data has been entered into the sub form.
Is it possible to have the main form refresh on exit from the sub form field automatically without having to press the button??
Could i hide the button and run a bit of code that runs the refresh button on the main form on exit from the subform field?
thanks in advance
View 12 Replies
View Related
Nov 26, 2006
Hello all, i'm trying to create a database just now and i'm banging my head a little on the forms side of things.
Can anyone tell me how, or if its possible, to create a "Main Menu" form, that gives you options to say, add a record to a table, to delete a record etc.
any help would be greatly appreciated.
cheers guys
View 2 Replies
View Related
Dec 10, 2006
Hi There,
I have 2 forms form1 (Main Form) form2 (Sub Form). Form1 acts as a header form and form2 acts like a details form. both forms are connected via code No. field. i have a combo box on form2 which on selection chooses code no and assigns corresponding values to different controls on form2. there is just one field required to be filed on form1, but i simply dont have a clue how i may go about it. for filling values on form2 i use this CODE IN AFTER UPDATE EVENT OF THE FORM :
Me.CodeNo = Me.Combo111.Column(1)
please advise me how i may update one text box on form1 from same combo box
Regards,
Darno
View 4 Replies
View Related