I have a sub form that shows items booked for a person, this subform is refreshed everytime a new item is booked. I want to be able to add commission so I have a combo on the main form that has commision rates in it.
I have a click event on the row in the subform with the hope that I could click a particular product and then if user clicks the description then the click event will add the commision due on that particular item.
the row is [prodid] [desc] [cost]
the question is how do i access the row data on the subform?
in this case I have grabbed the commission rate from the combo and now want the cost from the row i clicked.
I have a data entry subform that is only supposed to show an empty record ready to be populated, and a display records subform that is supposed to show all the records. The subforms are both on the same tab of a tab control on my main form.
Problem 1: The data entry subform shows all the records rather than a blank record. Something on my main form is causing it to show the records when it should not. Any ideas? The Data Entry is set to Yes.
To try to isolate the problem, I created a new form and added the subform to it where it behaves properly:confused:
I then added Me.DataEntry = True to the form open to see if that would solve my problem but it still sets the data entry to no.
If I have the properties box open when in form view of my main form, I can set the data entry to Yes and it works fine until I move to the next record of the main form when it resets to no. Teraing my hair out here.:mad:
My final attempt was to search the entire project to see if there is a "DataEntry = False" somewhere but there isn't. What is setting this property? Any ideas where I should look?
Problem 2:
After entering data in the first subform (data entry form), I want to re-query the second subform but I just can't get the syntax right. I have wrestled with the "Syntax for subs" document downloaded from http://www.mvps.org/access/forms/frm0031.htm (Microsoft MVP site) but to no avail.
My main form is called fdlgPrjDetails, the data entry is via fsubPrjCommentsUsersDataEntry and the subform I wish to requery is fsubPrjCommentsUsers.
None of the attempts below worked giving a cannot find control error.
Private Sub Form_AfterUpdate() On Error GoTo ErrHandler
i have a main form named(EMP) i have a subform named(SEMP)with EMPID i have an another form Named(SDetail) with EMPID i want to open form Sdetail with filter records for data select in subform (SEMP) ,EMPID field Subform SEMP in as datasheet view. i can open sdetail for selected records only
I am working on a massave aplication that has been running in Access 2000, but recently several of the file sharing users have installed Access 2003 because of the limited availability of Access 2000. All the users are using the same file off the server.
The problem we are having is that when we reference a subform in the "[Forms]![FormName]![SubformName]![FeildName]" Access 2003 does not recognize it and returns an error. I have found that if I will modify it to "[Forms]![FormName]![SubformName].[Form]![FeildName]" it is recognized in both 2000 and 2003.
To try and change every instance of a subform reference will take forever and I am garuteed to overlook something. We reference subforms all over our program, missing any one of them would be a disaster. Before I went to the tedious task of looking through everything I just wanted to throw the situation out there and see if any of you had any great ideas on how to get it fixed efficiently. I would apreciate any ideas.
Would like to be able to update a text field on the main form with information from a dropdown box on a subform when the subform data equals a certain value. Would like the main form field to update as soon as the subform information is selected from the dropdown box.
Example (sorry don't have code for it)
Mainform field = Mytext Subform dropdown field = Newtext1, or Newtext2, or Newtext3
If Newtext2 is selected on subform, I would like Mytext to immediatly show the value in this field (mainform/mytext). Do not want either Newtext1, or 3 to ever show in Mytext but want it to remain in subform field
It can either be on Lostfocus from subform or onupdate from subform, etc.
Whatever works best/easiest Thanks for the help in advance
Would like to be able to update a text field on the main form with information from a dropdown box on a subform when the subform data equals a certain value. Would like the main form field to update as soon as the subform information is selected from the dropdown box.
Example (sorry don't have code for it)
Mainform field = Mytext Subform dropdown field = Newtext1, or Newtext2, or Newtext3
If Newtext2 is selected on subform, I would like Mytext to immediatly show the value in this field (mainform/mytext). Do not want either Newtext1, or 3 to ever show in Mytext but want it to remain in subform field
It can either be on Lostfocus from subform or onupdate from subform, etc.
Whatever works best/easiest Thanks for the help in advance
I have a contact names form (datasheet) which lists contact names under certain criteria. What I want is a subform that then lists all other contact names for this company.(When you click the +)
So the linked fields are CompID for the parent and the child.
I do not however want to see the parent record again in the sub records - is there a way to remove it.
I have a form with an unbound subform that was working quite nicely. The only change I made was changing the data source for the main form from a query to a static table; name of table same as the prior query. Now the subform appears but the data doesn't. The buttons in the subform header are visible and work but the detail is not visible when displayed as a subform, it is fine if I open the subform as a separate form, I see the correct records based on the main form's criteria.
I have searched for some property I may have accidentally changed but can't find anything. It isn't set in data entry mode, not even a blank line shows.
Currently I have a button on my form that opens a second for to Add a New Temp Worker. This all works fine but when I close the form and go back to the entry form the subform hasn't been refreshed and so the new temp isn't in the list. I can't close the form that contains the subform as it will stuff up the data entry.
I have a query based on a table which gives a breakdown of sales by month, sale type and by cost centre (department).
I also have another query which summarises the sales by sale type and cost centre so that and is based on the first query.
the second query is a subform of the first. I tried the second query as an update query but couldn't figure out how to execute it in order to refresh the subform. I've also tried to requery the second query having recreated it as a select query but I'm not able to refresh the data.
The aim is to refresh the data in the subform as any of the underlying data is changed in the original form.
I'm ok with VBA and with macros so if anyone has any advise or ideas I'd appreciate it.
:( my database is a basic Customer Product Orders model. i am have trouble when i try to append orders to my archiveOrders table. this error appears. Microsoft Access can't append all the records in the append query. Aicrosoft Access set 0 fields to Null due to type conversion failuer, and it didn't add 1 records to the table due to key violation, 0 records due to lock violation, and 0 records due to validation rule violation. im very new to Access and there other thread i kinda couldn't understand :P. i have added my database and the current append query i im designing is called qappOrders. i really do need help, don't no where to start:(
I have a form (Main) with a subform (MainSub) set as a datasheet.
The main form holds details of employees and the subform holds targets and dates for the employees.
the subform has 4 fields, Target, StartDate, EndDate, AchieveDate.
What i would like to do, is show the date of the target that was achieved last on the main form.
For example,
Joe Young has 3 aims, 2 of which are complete and 1 which is still ongoing. Joe achieved his targets on 31/11/04 and 31/12/04. On the main form I would like to show a control called 'LastTargetAchieved' as 31/12/04.
If I am not making myself clear I will see if I can get a sample uploaded, otherwise, thanks for any help.
Hi, I want to add data into form frmStaff. Form frmStaff has subform sfrmStaffDetails. When i click on Add button, it will open frmStaff. I can add data into frmStaff but cannot add data into sfrmStaffDetails. This is the code,
Private Sub cmdAdd_Click() DoCmd.OpenForm "frmStaff", , , , acFormAdd End Sub
One of the forms in my database has a subform. The subform displays data from a table which is related to the data in the main form (also powered by a table) through a key relationship. So long as the relationships are set up correctly, the correct data magically appears in the subform as you scroll through the records in the main form.
I've tried to do this a second time, except in this instance the subform is displaying data from a query, and the data is related to the data in the main form not through a direct key, but through a link table. I've set up the relationships properly as before, but this time the subform stubbornly displays all the data from the query, not just that which is related to the record in the main form.
Hi everybody, i am an U Student from Singapore.and i am a new MS ACCESS learner. So please kindly advice me a question about MS ACCESS. I created one form called MonthlyTransaction. Inside this Form, i have another sub-form called Forecast. So my question is how do i save the MonthlyTransaction data into monthlyTransaction table and Forecast data into Forecast table? But the field name in Forecast table called MonthlyTransID is the value of MonthlyTransID in the MonthlyTransaction table.
I have 3 inputs based on which i'll fetch records from table in a subform for the given input criteria. Please let me know how to populate subform programmatically?
I tried source object property and form.recordsource property. It gives me some error or the other. let me know the right syntax to do the above mentioned.
Each record in the database has a subform (one to many relationship) with multiple records. When the user clicks on a record in the subform I want the information from the subform and from the mainform to go into a Word document. I am able to pull the data from the main form but not from the sub form. Any suggestions would be appreciated. Below is an example of what I am using to get the data out of the main form for the bookmark in Word called "ClientName".
To make a long story short I have a command button that runs a query and opens a subform based on that query. I want to be able to update the records that are returned (via the subform) but I am getting an error - "This Recordset is not updateable". I've tried changing the recordset property to Dynaset (Inconsistent Updates) but that didn't seem to change anything.
I'm looking for a little help on something that I'm sure is an easy problem. I'm building a form for patients (data from Table: Patients) that contains a subform containing lab values (Table: Lab Values). I'm new at using subforms so I'm in a little over my head.
Both Tables contain the patients name to link them together. When I create the subform, I don't want it to display the patient name, because it is already displayed in the header. But if I don't include that field, I can't link the two tables together. I'm using one of Microsoft's templates off their website (called Contact Manager Database) as a guide, and it has exactly what I want - a sub form that only displays the relevant data for each patient, but when you add a record the data in the table automatically includes the name of the person.
I just can't seem to figure out how to do this. I'm sure I've been very unclear describing this, and I'm sure this is an easy task, but if someone can give me a little direction I would greatly appreciate it.
I have a form that displays a specific set of data depending what you select in a group of list boxes before. See image below:
13516
You select a PIPELINE, a YEAR and then a HAZARD, and this brings up a series of risk assessments depending on what you've selected. The RISK ASSESSMENT is actually a subform thats been set up to look like a list box. (Side Note: The reason I have done this rather than just use a normal list box for the risk assessment is I wanted to have a combo box attached to each record in the list box. Access does not allow you to do that so I had to fudge it). The RISK ASSESSMENT subform is populated by a query. At the bottom of the form is a normal list box displaying the same information thats in the RISK ASSESSMENT - I have done this as a test to ensure that my fudged subform is doing it's job.
From the fist screen capture you can see that the combination of PIPELINE, YEAR and HAZARD produces 3 risk assessments - this is also confirmed in my test list box. Everything is ok so far.
The problem I have is that I can only get my subform to display the data when the PIPELINE selected in the first screen capture is selected. Any other pipeline selection does not display the data in RISK ASSESSMENT. However, I know the data is there as my test list box displays the data. See image below:
13517
Therefore, my question is, why would data be displayed in the subform for some selections but not others, even though the data is there?
I have a form and subform. Clicking a record in the subform displays the details of that record in the main form. The form is used for editing, adding and deleting data for a given person's sales record and the subform displays a full list of all records for that person.
When I edit a person's record, using the main form, and click on a button to run the code:
DoCmd.RunCommand acCmdSaveRecord
I can go into the underlying table and see the changes. I can also refresh the subform and see the changes.
However, the next time I click on any of the records in the subform, the value in one of the fields vanishes from both the subform and the table. Any other changes made, to however many fields, remain.
Surely, if there's a problem with that field, the update shouldn't happen at all?
i have a form THE OREDER FORM and on it there is a subform that stores a list of codes and corresponding products for a particular order.
Now what happens is that sometimes ORDERS have the same product codes, so what I wish is to see if it is possible in same way or another to copy the data on the subform to create the next record as the previous one, and thus avoiding re-choosing all the products.
how do i click on my data in a list box (4 fields unbound)) on my (main form) so that it goes straight to my subform fields (same 4 fields from the list box), this will save me on data entry and i can just enter my quantity and it will calculate a total for me.
i don't want a combo box in my field on the subform.
I have a subform (studentmodules) which should pull data from two tables (hea) and (hea courses). Hea table contains the course code, title, level of study and award, Hea Courses contains the start dates, location, cost and tutor etc for each intake of the course.
When I enter data into the Student modules form I can type in the HEA number, and then have to choose the course title from a very long drop down list (which doesn't seem to work for some reason as values do not stick) and then enter the award and the level of study. I am able to enter the information relating to the course intake, and this automatically updates the information in fields relating to start date, coordinator etc.
How do I get Access to do the same for the HEA information.
I had a problem earlier with a subform (posted May 30/2013, "Subform is blank") whose database was fairly complex (for me, at least), so problems I had with the subform may have had many causes. So I decided to build a very simple test database for employees and their phone numbers. There are three tables: AllContacts, for the names, PhoneNumbers for the phone numbers, and PhoneNumberType for the type of number (office, mobile, home, etc.).
Each employee may have several phone numbers. A main form is for entering firstname and lastname, and the subform is for entering the phone number(s), and the type of number (office, mobile, home, etc.) for each one.
The problem I'm having is that the subform will not accept data in its Number Type field. The error is "The field cannot be updated because another user or process has locked the corresponding record or table. (Error 3164)." I'm the only user, and the control has no locked fields. The Phone Number field will also not accept data: "Cannot add record(s); join key of table 'PhoneNumbers' not in recordset."
I suspect my table relationships may be incorrect, but I don't see where.
I have a form with a sub form, on the main form I want the user to select a machine number and then when they have selected it I want to populate the required data into the sub form.
In the sub form I have a field called "Seal" and another called "Quantity" what I require is to get the results from either a query or table and list all the seals & quantities for that machine.
I have a table called "Machine" which has all the machine numbers and also fields called "Seal1", "Seal1Qty","Seal2, "Seal2Qty" all the way to Seal 10.
I do not know how the best way to get this data into the sub form...