Hello everyone,
I have a combo box on a form tha displays information based on 2 columns from a table.What I want the combo to do is to allow the user to select the row he wants and for the field that is bound to the combo box to store the outcome of collumn1 + collumn2 (string values).
Is this at all possible and if so how can I do it cause I can't find a way.
Thanks for all your time and effort :)
I'm looking for a way to have a text box auto fill based on the selection of a combo box on the same form. I cannot use the method i find all over the internet of using multiple columns in the combo box and basing the text box on that because the combo box already has multiple columns being used to determine its own possibilities and other combo box possibilities.
I would really just like the text box to work like this, but im still kinda inexperienced in VBA...
If combo box is "F004-001", then text box is "237" If combo box is "F004-003", then text box is "280"
I know how to add in an "after update" thing, but i do not know how to do If/then statements.
Hello everyone, I have a combo box on a form tha displays information based on 2 columns from a table.What I want the combo to do is to allow the user to select the row he wants and for the field that is bound to the combo box to store the outcome of collumn1 + collumn2 (string values). Is this at all possible and if so how can I do it cause I can't find a way. Thanks for all your time and effort :)
I have a problem trying to sum a numeric column based off another column in the same table. What I am trying to accomplish is to sum a numeric column if a corresponding column is Not Null.
I have uploaded my sample DB that to illustrate my problem. The query I am testing with is called Query1 and I am looking at summing point values from the task table grouped by the test case those tasks are in. I can easily sum the total number of points for each test case. But when I add another field to the query to sum the point values of the task in the test case that have a date entered into its corresponding date field it will not sum them correctly. The result I get is the same sum total is shown for all three fields in the query.
I have tried several attempts at making criteria for this to work but nothing seems to work the way I want it too.
Here are my attempts: IIf(Not (Sum([Task].[Points]))=IsNull("Attempted_Actual"),Sum([Task].[Points]),0)
Is it possible to do want I want all in one select query or would this be something to code in a VBA module and then just call that module in a report?
My plan was to do this all in a query then build a report to display this query.
I have attached my dummyDB file and you can look at the Test_Case Table and expand each test case to see the data I have populated.
I have a requirement of searching the database based on 3 columns. I have attached the search form and the code.
Private Sub cmdSearch_Click() Dim strSQLHead As String Dim strSQLWhere As String Dim strSQLOrderBy As String Dim strSQL As String Dim strJoin As String
I am trying to get the Total average speed answered (ASA) based on two columns sums. (i.e. sum of calls handled and sum total speed answer). I need to get the total avg speed ans (formula is sum of total speed answer (tsa) divided by sum calls handled). I did an average query for asa but it gives me the avg for the rows(records) of the asa and not of the two columns. I need it for the two columns above. I was trying to change the formula in report design view, but I am not coming out with the correct answer. Are there any suggestions?
Is it possible to have a calculated column based on another table. i have a 1 to many table. the table that is the parent hold a start time. all of the 'many' have an individual time length. i would like a calculated column in the parent table showing the full length. is it possible or will i have to use an update query?
I have a dataset of about 70 columns but would like to remove any two rows that sum to zero (based on two columns) if the column "Units" are the same for the same "Bar code" thus to say "for the same 'Units' (for any two lines), check to see if their respective 'Bar Codes’ are the same and if so remove if their amounts sums to zero".
I have the following code which seems to be working but for relatively large data ( about 5k), it does not select all the data that meets the criteria:
Code: SELECT * FROM datatable WHERE ((([datatable].[Unit] & [datatable].[Bar Code] & Abs([datatable].[Amount])) In (SELECT datatable.Unit&datatable.[Bar Code]&abs(datatable.Amount) FROM datatable GROUP BY datatable.Unit&datatable.[Bar Code]&abs(datatable.Amount) HAVING count(*)>= 2 and sum(datatable.Amount)=0))) ORDER BY [datatable].Unit & [datatable].[Bar Code] & Abs([datatable].Amount);
identifying the bug in this code that makes it not pull all the data meeting the criteria.
I've got a data entry form that is used to enter incoming waste consignment data. (I've attached a screen grab of the form) Each screen represents one record and the data is recorded in a table called "IncomingWaste". The top of the form (light blue) refers to the customer/producer of the waste. Most of that detail is held in another table on the db. The bottom (Dark Blue) part is used to record the consignment data. It gives the user a grid to enter the individual waste components within the consignment (choosing from Drop down menus for the various descriptive elements) Most crucially, the weight of each component is recorded.
I have a calculated field at the bottom which gives a Total weight for that consignment. It simply adds the weight fields together and delivers a total in the box at the bottom of the screen which displays the total weight in that consignment using "Nz([weight1])+Nz([weight2)]+ ...etc - which works fine on the form. However, I can't seem to get this calculated total recorded and appended to each record in the table and I assume it must be re-calculated each time the screen loads (?)
The main issues is.... I need to create a report which adds the total weights from each customer over a monthly/quarterly period and I simply cannot seem to do it.
I have created the report which groups all the consignments from each customer and lists them in date order, but I can't identify or define the method I need to use to collect that Total Weight calculation from each consignment record and add them up to give a grand total for that customer for a particular period. I'm assuming if I can crack the first part and get the total recorded in the table, then I can call the value into the report.
I hav a combo box that has three columns in it. I want the user to select an item and I want all three columns to show up in the combo box instead of just the one I am capturing. How can i do this? I tried to put the Bound Columns requirement in the the combo box's properties to 3 but it didn't do anything. Please Help.
i have a combo box reading in two fields from a table - id and name. Is it possible to have "autofill" pick up the name but when i make my selection, the id becomes selected.
i.e. if i have these: ID NAME 1 Pete 2 Dave 3 Alan
and i type in "Dav" and press enter, the value in the combo box will be the id "2".
the problem ocurrs when choosing from the cbo with the same value. it always seems to slip back and choose the value with the lowest .column(1) value. in the above example, if I select s1 03, for some reason after the cbo drops back up, s1 02 is selected.... even though i didn't select it. weird!
I will need to create a new column in a query with data based off of two columns currently in my DB.
Current fields are: [TestType] & [TestReason]. New TEMP field will be [TestCombo]
TestType has 4 possible option via drop down. TestReason has 21 possible options via drop down. TestCombo will be one of 10 options depending on the data in TestType & TestReason.
examples: (here is an example of how the combo field will be populated. There will be ten total rules like this. one for each possible text option in the combo box.) If [TestType] is "DRUG" & [TestReason] is "PRE" or "RAND" or "PA" then [TestCombo] would be "DOTDT".
If [TestType] is "ALCOHOL" & [TestReason] is "PRE" or "RAND" or "PA" then [TestCombo] would be "DOTAT".
If [TestType] is "DRUG" & [TestReason] is "N-PRE" or "N-OTHER" or "N-FUP" then [TestCombo] would be "NDDT".
The data does not need to be saved anywhere at all in the database, just generated when pulling this query. It will then be exported and dumped into another system.
Thanks. Here is a temp copy of the database with some junk data to maybe make it a little more clear.
I would like to know if the following is possible: I have a table, I have a form based on that table (datasheet view) and I would like for certain columns to visible or not based on the input on a Combobox (list of countries) that is based on another form.
I have searched on the web and I found that the following:
On a button based on the main menu form:
Code: Private Sub Go_Click() Dim stDocName As String Dim stOpen As String stOpen = Me!cboDest stDocName = "Datasheet" DoCmd.OpenForm stDocName, , , , , , stOpen
and then on the event "on open" of the form Datasheet I have inserted the following:
Code: Private Sub Form_Open(Cancel As Integer) Select Case OpenArgs Case "USA" Forms![Overflow]![Tasks].Visible = True Forms![Overflow]![Constant Number (Min)].Visible = True
[Code] ....
I have done it as a test, but it appears that it does not work. It opens the forms, but it does not hide or show the columns based on the option, it brings all the columns.
I have a database table in which I'm trying to pull sales data and generate sales reports from. The problem I face is that the sales data is recorded into a table with this structure:
Year | Customer | Sales_Month_1 | Sales_Month_2 | Sales_Month_3
Rather than having a single field "Month" in which I could set criteria or prompt the user to select a month to derive sales data from, I need to write a query that through user input (or through some code within the query) the right field will be selected. An example of this would be generating a report for the 1st month of the year, obviously.
I have a report with many columns in the detail listing data, and their associated titles above in the page header.What I would like to accomplish is the ability for the user to check boxes off on a form which will remove/add specific columns to the report. The form will essentially be a "build your report" style, with a button on it opening the print preview of the custom report.
Im assuming this is accomplished by the "on load" part of the form through VBA. How is the sizing handled? If the user un-check's a box to remove a column of data, how is the header and detail data "moved over" or re-arranged to accomplish a relatively decent looking layout? Any example or example code to deal with one column/setup (which I can copy and modified)??
I have a big Excel file with payroll information about employees. Per employee per date, there are a couple of rows with mostly identical data (such as the employee's home address) but 2 differences: one will have paycode A with amount B, another will have paycode C with amount D, etc. I want to simplify the file to have 1 row per employee per date: in the example given that row would have paycode A with amount B as well as paycode C with amount D, in 4 separate columns.
I think I can technically solve this by creating Excel files per pay code/amount, and then linking them together by person and date, 1 by 1, through Access. This is feasible because there aren't that many different pay codes. But still, I was wondering if there was anyway to solve my problem in Access itself.
Hello, I am using an IIF statement in my SQL criteria, and was wondering "if" it was still possible to reference a column within a combo box... here is one iif statement
Like IIf(IsNull([Forms]![fSampleSearch]![cboCustomerName]),"*",[Forms]![fSampleSearch]![cboCustomerName])
I want to refer to the third column of cboCustomerName... How would I do this ?
I have a table with ProductName and QuantityAvailable...I have made a combo box which contains these 2 columns however there is no fieldname which I want.
I have a combo box with two columns. The first column has a drop down list of radiology studies (2view Cervical spine, 2view Lumbar spine etc.) the second column has the associated CPT code specific to that study. When I click on the drop down box on my form, the first column I can see both columns but when I pick one only one of them shows. Is there a way to see both columns or should I just add the CPT code to the first column?
I am trying to set up a combo box that has 3 columns
The first column is the column I want to search on as I know the part number but it is the second column where I want the data to go into the combo box field
I am extremely new to access. I am trying to add a combo box to one of my columns. Basically i have about ten columns of which a couple of them I want to have combo boxes so that the information that is in each of these columns is standardized. Currently all I have is my ten columns with headings set out.
I have a form that currently uses a "catch all" table for listing available equipment to choose from for an equipment field. I call it tblEquipment. What I want to do is to make it so when I type a name in (1 of 35) in one field of the current record, the record source for the equipment field immediately looks at a different table that has equipment available only for that name. To do this I plan on making 35 different tables with limited data originally found in tblEquipment. I would call these tblEquipment1, tblEquipment2, etc. I do not use a sub form, nor do I want to.
So my questions are:
1) can this be done 2)If it can be done, how can I do it?