I tried looking through the threads to find something that is relevant to my situation.
I am having trouble with a form where i need to select a name in one combobox and a month in another and then upon which a subreport displays the records for that name and month on a subreport which can then be added extra records or old records edited.
Does anyone know how to do this or can maybe just give me some code or point of reference to do this. I have tried but all attempts return no results.
Hello guru's, I've searched the complete forum for the answer but I just can't find it. I've got a main form with 2 comboboxes on it. The first one filters the second one. What I need now is the 2nd combobox to filter the SubForm. I've tried to add a subform with the wizard but then it shows the complete table instead of only the ones selected in the second combobox.
I've got 3 tables: 1 for classes, 1 for students and 1 for the attendance. The 1st combobox selects the class, the second one selects the student. The 3rd table is used to enter absences (date, time, teacher etc) and it should appear in the subform when the student is selected.
Can anyone please give me a little advice? Thanks heaps in advanced! Sebastian.
sorry if this q has already been asked, but i couldnt find what im looking for after searching..
i have a main form. there is a combo box that is that is bound to tblSupplierDetails. this combox displays the records stored in tblSupplierDetails fine. now beside this combobox i have a hyperlink that opens a subform called 'subfrmAddNewSuppliers'. this subform works correctly - ie. when details are entered here, they are stored in tblSupplierDetails
my prob is that if the user adds new supplier details via the subform, these details do not appear in the combo box for the user to select when they are returned to the main form.. they appear if the form is restarted
Ive inserted the statesment Me.ComboBoxName.Requery (with ComboBoxName ammended) into the event procedure for After Update for the combobox.
however, with this the new details which are added via the subform are replacing the previously added record - so theres only ever one record in tblSupplierDetails.. can someone pls help me with this?
I have a combobox that displays information about a current record on a form (much like a subform would show all information related to a certain record). So for example, there is a user and the combobox would list all the users applications. Now, when the record is changed (via the navigation buttons) I want the combobox to requery, but I don't know where the query should go. I tried putting the requery under the primary key's afterupdate method, but no go.
Can anyone think of a solution? Do you understand my problem?
Hi well baisically the title explains the dilemma... I have a combobox in which the user selects an item and this updates the subform depending on the selection. However when i make a selection i get the following error:
Rumtime error '2101':
The setting you entered isnt valid for this property.
I understand what its telling me, however i cant seemed to find within the code where i have gone wrong, so heres the code:
Private Sub Combo4_AfterUpdate() UpdateSubform
End Sub
Private Sub UpdateSubform() Dim strSQL As String Dim varWhere As Variant
varWhere = Null
strSQL = "SELECT * FROM Sub_qry_CostCentre"
If (Me.Combo4 > 0) Then varWhere = " WHERE (CostCentre = " & Me.Combo4 & " )" ' MsgBox (strSQL & varWhere)
I have a mainform in access with a subform (continous form mode). The subform's source is a query that has a criteria parameter that gets the values from a combobox in mainform.(list of projects) Combobox name= cmbProject
It works fine for some records (old records), so when I migrate new data into the table the comboxbox display the new data but when I select the record to be dispayed on the subform, the record or data is not in the subform, so the record is in blank.
I have a basic form linked with a subform inside of it. The main form has a list of customers in a combobox and the subform lists all the things they have ordered from us. This all works perfectly fine, I can add data to the list of things ordered and it's ok.
I decided instead of using a whole extra form to add customers I'd just have a not in list event and allow users to add customers through there, bit more intuitive and cut down on forms.
It works to certain extent except one small problem, if I add a customer I have to close and reopen the form to be able to add/remove data from them in the subform. If I leave the form open and try to enter in data in the subform immediately it just shows whatever customer I had last on the combobox and adds it to the last customer as well.
It works perfectly fine if I reopen it so I thought it was some kind of query or update snafu but all the VBA code examples I found don't seem to do anything. Not exactly sure where to go from here.
PHP Code:
Private Sub cboDept_NotInList(NewData As String, Response As Integer) Dim oRS As DAO.Recordset, i As Integer, sMsg As String Dim oRSClone As DAO.Recordset Response = acDataErrContinue If MsgBox("Add dept?", vbYesNo) = vbYes Then Set oRS = CurrentDb.OpenRecordset("tblDepartments", dbOpenDynaset)
Right now I have a subform with a combobox that pulls it's data from a table. I want the user to either select an existing item or type in a new item and have a macro create the new table row. What I have right now works in the sense that it prompts the user if they want to creat a new item and the new item is created (and I can see it in the combobox list), but I'm still getting an error saying that the item does not exist in the table forcing the user to manually select the newly created list item they just typed in.
Code: Private Sub MaterialCostCode_NotInList(NewData As String, Response As Integer) Dim rst As DAO.Recordset 'Update value list with user input. On Error GoTo ErrHandler Dim bytUpdate As Byte
[Code] ....
It appears that the new item doesn't always show up automatically and requires the form to be refreshed, so now I need to figure out how to get it to consistently appear right away without a refresh.
I am designing a nomination form (web database so no vba macros can be used).
The form has 3 combo boxes: cboStaffName, cboLevel, cboNominee.
The form is bound to the tblSubmit table where the submissions are populated.
I used a select statement:SELECT Staff_List.Staff_Name FROM Staff_List; to populate the combo box for the Staff Name selection.
This is the select statement to populate the job level combobox:
SELECT Staff_List.Level, Staff_List.Staff_Name FROM Staff_List WHERE (((Staff_List.Staff_Name)=[forms]![frmtest]![cboStaffName]));
The select statement to populate the combobox for the nominee combobox:
SELECT Staff_List.Staff_Name FROM Staff_List WHERE (((Staff_List.Level)=[forms]![frmtest]![cboLevel]));
The problem is that the staff_name in the first combobox is still found in the nominee combobox which should not be because a staff cannot nominate self. There is a field in the Staff_List called YesNo that should be activated for each staff that is selected so that the select statement on the nominee combobox can be updated accordingly to remove items with the field "Active"
How to get the checkbox selected for each corresponding staff.
I am trying to use a combobox called Manufacturer to select which table the combobox called Model gets it's rowsource from using the code below.
Code:
Private Sub Manufacturer_AfterUpdate() If (Me.Manufacturer.Value = "Siemens") Then Me.Model.RowSourceType = "Table/Query" Me.Model.Recordset = "SeimensTable" Me.Model.RowSource = "SELECT Model FROM SeimensTable" Else If (Me.Manufacturer.Value = "Samsung") Then Me.Model.RowSourceType = "Table/Query" Me.Model.Recordset = "SamsungTable" Me.Model.RowSource = "SELECT Model FROM SamsungTable" End If End If End Sub
But when I run the form and select Manufacturer. Combobox Model remains empty. tell me what I'm doing wrong?
How would I modify multiple comboboxes in subforms at the same time. For example.. In main form ComboboxA user selects 1992, Combobox1 in subform1 is also changed to 1992, as well as Combobox2 in subform 2.
I've created a database which I'm pretty much using as a point of sales terminal.. it does sales, returns, expenses etc. I have created a report for each one of these (sales, returns...) which can be printed off at the end of each day.
At the moment, if there is no data in one of the reports, I have put a bit of code in the NoData event of the report that will make a label visible saying "no sales/returns/expenses for this date".
I am trying to combine all of these reports into one report so the user can click a button to open a general "End of Day" report. The problem with making them all subreports is that if there is no data in a subreport, nothing will be displayed in that subreport.
Is there anyway to force access to display a subreport regardless of whether is has data in it? or can anyone see another option which i have missed?
I have 2 comboboxes, the first one is called "activity", whereby I have 3 options to choose from, and the second is called "level".
When I click an "activity", for example Drawings, I want the "level" combobox to list a unique set of options for that category. and if I click on a different "activity" for example Planning, I want the "level" combobox to show a completely different set of options.
If anyone can give me any help on how to do this then I would be very grateful!!
Is there any way to add a dropdown box or something that determines that a subrecord is active/completed, and then have a way to jump straight to the one that is active by clicking a button on the record? In the example I attached, I want to be able to click on the button above the tab and have it switch to that tab and open the first record it finds that has "Active" selected.
i have a subreport on a header of one group and sometimes has data and sometimes hasnt.I would like that when subreport is empty it doesnt show subreport header but I dont know how.code Me!subreport.Visible = Me!subreport.Report.HasData doesnt work properly since it always has data,just not on every page....
I have created a report and the subreport. The information from the subreport will not show up when I bring the report up. I created a query with the info needed for the subreport but know I'm missing linking something somewhere? Any help? Thanks-
I'm new to access, I've done database work before just not with this package, I have only one small problem and this should be an easy one...
Without going into too much detail, i have a report that generates a list and calculates a few totals based on a date range inputed by a user. (I do this by using the "Between[Report Start Date] and [Report end Date]" statement as my criteria for the DATE field in my SQL statement.)
Inside that report i would like to include a subreport which summarizes the data of the main report. this subreport needs to display data based on the same date range as the main report. I simply cannot figure out how to get the subreport to use the same date range without prompting the user to type it in twice. I have another report that generates a subreport based on a users last name, this subreport works just fine ( I think this is because there is only one user inputted field and not two as with the date range.)
Both the subreport and the main report calculate the correct data when run independently, so I am confident they whole thing will work as soon as I know how to share the user inputted criteria.
If you have any answers please reply ASAP, it would be really appriciated.
I have a loan database, and I need a detailed report with the borrower's name, repayment details according to their loan serial number. In the same report, I will also need details of all other people whom they have acted as guarantors for.
So what I have is a form for the user to select the person they would like to check on. Based on the user input, it generates a report with the borrower's details, as well as loan details. I then have a subreport which lists all repayments made based on the loan serial number, which works fine.
I'm stuck, however in trying to create another subreport in the main report to generate all details pertaining to loans which the person has acted as a guarantor. I tried linking the Guarantor's name to the form for the input, but in doing this, I get the guarantor's details, but my loan repayment subreport returns a blank.
Any suggestions or ideas, please?
It will be greatly appreciated! Been stuck with this for a few days now.
I have a form that has combo boxes and text fields (as well as sub forms). There is also a button linked to some code that says'
Private Sub cmdQuote_Click() 'Creates quote date and prints quote Me.QuoteDate = Now() Me.cbAgentID.Requery DoCmd.OpenReport "Quote", acViewPreview, , "BookingID = " & Me.BookingID End Sub
When the button is pressed the QuoteDate field (it is bound) should be be populated, but unfortunately it is not. I have played with refresh and requery but cannot derive a solution.
I have a Report linked with a SubReport. I would like to cancel viewing this Report if my SubReport Has No Data. i tried this code but the report just shows up. Any Ideas?
Private Sub Report_Open(Cancel As Integer) On Error GoTo Err_Trapper If Reports![qryRepCurOrgProjsSR].Report.HasData = 0 Then Cancel = True End If Err_Trapper: MsgBox Err.Description Exit Sub End Sub
Ok i got an error message. Yoy entered an expression that has an invalid Reference to the hasData property.
Ive tried using a text bpx on my main report and putting a control source as
=IIf(qryRepCurOrgProjsSR.Report.HasData,0,"Nothing") Then in my Report Open Event i put the code below. But it fails me still.
If trim(Me.MyText) = "Nothing" Then MsgBox "The Report Is Cancelling....." Cancel = True Exit Sub End If
I have a report with the same subreport appearing twice. The two instances of this subreport have different queries.
For instance boys and girls information. The only difference is the queries (one would have sex=M the other sex = F)
Is there any way of doing this without copying the subreport and giving it another name (this of course would allow me to assign different queries to each subreport).
I am trying to do a simply calculation on a report which uses a value from a subreport. The main report is called rptAllProjectsStatus the sub report is called rptAllProjectsStatusExp, and the box from the sub-report is called tboAmount which is controlled by query.
In the main report I have a box whose control source is =[tboFixedFee]-[tboSumStaffingCost1]-rptAllProjectsStatus!rptAllProjectsStatusExp!tboAm ount
But it doesn't recognise this formula - what am I doing wrong?
I know the problem is with the latter part of the formula (in connection with the sub-report), as if I remove this part, the rest of the calculation works fine.
So I am adding a chart (on a subreport) to a report that has multiple subreports already. I have gotten the chart to show up correctly on the report, but now 2 of my other subreports are not working. I am being prompted to input parameters for these subreports that used to pull their parameters (between dates) from the main report.
I read somewhere that charts master/child linking doesn't work but I'm not sure if that applies to subreports with charts on them, or just charts in general. I've tried changing the query on the chart subreport a little without luck. Is this likely some glitch thing? Should I keep trying to alter the query or maybe there is some other work around option?