I have a simple question with an answer that hides relentlessly from me. I have a combo box on the main form called cboProjects. I also have a subform called SubProjectsDetails. I'm trying to get it to where if a user selects a project from the combo box, the details show up in the subform. The relationships are good and working, and if I add a Find Record button on the form, that works as well. I just don't know the code to dynamically populate the subform with combo box values.
Hi, I've a unbound combox field in main form, which upon select the subform should display the information. I tried this code but it gives me an error :
I ve searched these forums but cant for the life of me find the answer althought there are a lot of posts on combo box filters.
I have MainForm based on tblStaff. I have SubForm based on tblTimesheet.
They are linked by StaffID.
The user selects a Project from ProjectID in the Subform which is filtered to only show Projects assigned to that user. This is done by filtering the combo box by StaffID from the MainForm. Works no problem.
The problem i have is in the next combobox which displays the potential activities for the user. As there are about 80 potential activities i want to filter this based on the Project Role. There are only 5 project roles. I can refer to the project role in either the SubForm query or the ProjectID combobox query but it doesnt work.
I hope this is coherent. Could anyone suggest some code or query parameters for this!?? I'm not an idiot but im beginning to wonder.
hi, umm im tring to copy values from a combobox into a textbox so that multilpe values can be saved on the databse.
the textbox it linked to a table, and the combobox uses sql quries 2 get data from a table... i have a command button which then inserts the vaule from the combobox to the textbox.
in the commmand button the vba code used is: textbox.value = combobox.value
but this only insert one value to the text box i want multiple value one after the other. it just keeps replace the value which is already in the textbox i want it to add on 2 the value in the textbox...
can any1 help me out? thank you 4 ur time! purejoker!
Hi every body. I got bounded form as picture below. Initially the form loads all the recod. I want add a feture to this form so that when i make 4 combo box selection it goes and load those records that matches that crieteria only . All my controles are in the main form. I am not using form and subform.I be happy if some one show me how i can switch from show all mode to filtered mode.(an example higly appretiated)Thanks
http://i5.photobucket.com/albums/y180/method007/comboboxfilter.jpg ( form pic)
I would like my form field to populate based on what the user selects from 2 combo boxes I have. I have a table set up with Region, Position, and Name. I would like when the user selects for example Eastern for the region and President for the position that John Smith would auto populate in the form field. Is this possible and if so, how can I get this to work?
What is the best way to get a field to automatically populate on a form when the user select criteria from 2 combo boxes. For example in cbo1 the user select Eastern and cbo2 the user selects Regional President. How can I get in a seperate field the name of the Eastern Regional President to populate?
I have a form with a combo box, whose afterupdate code is:
Private Sub CustomerName_AfterUpdate()
Dim rs As Recordset Dim person As String {This will contain the SQL Statement} person = "select people.department from people where people.name='" &
CustomerName.Value & "'" Set rs = CurrentDb.OpenRecordset(person) {Now the following are combo/text boxes that are populated} Department.Value = rs("department") InputDate = Date InputTime = Time
My code works: when you select something in CustomerName combo box, the other
boxes in the record get populated with data. The problem is that ALL the records in the
form get populated with this data as well... I want the records to be independent of each other - that each record will be filled
I want to populate the Class Code field based on the class they select. The code works fine except that the Class Code field does not update until after I tab past it. There is a field in between Classes and Class Code so I have to tab 3 times before the textbox populates. I expected the textbox to populate immediately after I selected the class. I also tried putting the code in the On Click event of the combobox but that didn't work either.
If I just keep clicking on different classes I'd like the class code to change each time without having to tab to another field. Is that possible? What am I doing wrong?
I have a form with a combo box, whose afterupdate code is:
Private Sub CustomerName_AfterUpdate()
Dim rs As Recordset Dim person As String {This will contain the SQL Statement} person = "select people.department from people where people.name='" & CustomerName.Value & "'" Set rs = CurrentDb.OpenRecordset(person) {Now the following are combo/text boxes that are populated} Department.Value = rs("department") InputDate = Date InputTime = Time
My code works: when you select something in CustomerName combo box, the other boxes in the record get populated with data. The problem is that ALL the records in the form get populated with this data as well... I want the records to be independent of each other - that each record will be filled separately.
Currently have a Form / SubForm arrangement combining qryItemAllowedAndUnschedlued with tblInventoryItem.
The main form is based on the query and the subform on the table.
My effort is to create cascading combo boxes where a selection in the main form populates a "conditional" list in the subform.
More specifically, where the user selects ItemClass in the main form, I am attempting to populate a list of ItemCategories in the subform based on the selected ItemClass.
I have reviewed and continue to study existing posts on Cascading Combo Boxes and Form / Subform arrangements. However I currently have a question I do not see covered...
When I select my ItemClass it is populating throughout the query and not solely in the current record displayed.
Does anyone know why this may be?
I fear the answer is a simple setting that my current experience is making difficult to isolate. I trust it will present itself with patience, but in the interim more experienced feedback is welcome!
Simple question but I've been stuck for a looong time.
So what I want to do:
1. enter a value into a text box (Home_Tel) in a form (frmStudentClass) 2. which runs a query (qryNameTel) 3. and return the results to a combo box (Student_Name) on the same form.
The same Home_Tel may have several Student_Name results.
-I have entered [Forms]![frmStudentClass]![Home Tel] for the criteria in the query - However I can't get the results to turn up on the combo box - I have the following:
Private Sub Home_Tel_AfterUpdate() ' run query DoCmd.OpenQuery "qryNameTel"
Me.Student_Name.Requery
End Sub
Any ideas?
Or is there an easier way to tackle the problem?
Home_Tel and Student_Name are from the same tables. I have created a query just for Home_Tel and Student_Name
When I enter a combo box on a form, whatever I choose from the combo box, it populates everything. If I go to a different row to change it, it changes them all. How do I get that to stop? And why does it do that?
I have a query that populates a report linked to a mail merge. There is an IFF statement in it that checks to see if a condition is meet. If that condition is meet some standard text results. Is it possible to put a disclaimer with the standard text.For example,
Code: IIF ([Results]="Negative","Nothing detected" (the disclamer would go here)
I am not certain the correct syntax to use to insert "not all regions were tested".
I think my question is fairly simple - fingers crossed.
I want to create a field that, whenever a record is added, it auto-adds the date & time the record was created. I'd call it Book_Date_Added, or something like that. I tried snooping around the Default Value options but couldn't figure it out.
The table exists and it already has some records, so I'd need to know how to add this field rather than how to create it when I create a table (although that would be helpful too, if it's somehow different).
We use access to enter our service tickets in at work.What we have are three date fields.
Call Date Start Date End Date
We are 24/7 operation.Currently all 3 just autopopulate with the current date.What i would like to do is ADD a CHECKBOX next to each Date Field.And make it work like this.
1. let them autopopulate as they are currently 2. if you end the call AFTER MIDNIGHT (the next day). CHECKING the box would automatically populate yesterdays date in each of the fields that has the check box CHECKED
I have a form, a couple of comboboxes and text boxes on it. When these are filled out, the SQL of a query is changed using these parameters.
There are three subforms on the form, all pivot charts, all based on the query being changed.
The goal would be to update all three according to the user-given parameters.
Right now the subforms only update if I close and open the form, which is probably not the best solution, since it's too slow.
I've also tried to requery and refresh them, with no result.
Then I tried to overwrite the recordsource of the subforms with the same text that was originally there. This got them to refresh their data, but then all of the charts disappeared and had to be built again, so this is a no go too.
I have two subforms on a main form. Both use similar queries and nearly the same set of records and PK. The first subform is for data entry and the 2nd subform is a continuous form that lists the entries in order that are made from the 1st Subform. (for entering in vacation days and appointments)
The continuous form cannot be edited, it is to be a list for viewing the information only.
I have an edit button next to each record on the continuous form. When the button is clicked, I want it to take the 1st subform to that specific record as well (same PK), so the information can be edited there.
I cannot figure out how to get the 1st subform to go to the record on the continuous form when the button next to that record is clicked on the continuous form.
I tried the DoCmdSearch for record and just keep getting object is not open errors.
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
im having problems getting a subform to calculate another subform's total and display it as it keeps coming up with the #NAME?.Basically my database is like this
tblCustomer - tblOrders - tblItems
and this is displayed on a form. so you can flick through clients, then flick through the orders and its broken down into the items inside each order.i have seen many answers that are only about calculating something on a subform and displaying on a form but this does not work when displaying on a 'parent' subform. the form structure looks like this
i have a calculated control textbox in the footer of sFrmCustomerOrders with sums up all the prices using =sum([Price])and in my sFrmCustomerItems, i have a field called Amount (the total amount of all the items) and the Control Source formula i was using was =[Forms]![sFrmCustomerOrders]![sFrmCustomerItems]![txtTotalPrice] but i get a #NAME? error.
I didn't know that Access is supposed to only have 2 subform deep. On my form, I have three subform deep. However, the master form is unbound, not linked to subforms, and nothing more than a container for tab pages which contains their own subforms and has no code directly associated with data. There is a code to move subform to new record when tabs changes, but that's all.
Does that mean there is really only two subforms deep from the topmost form on the tab page or the subform depth has been exceeded whether the master form has no role in data transaction?