Show Current Record Value From Table In Combobox In Addition To Query Results
May 3, 2015
I have a table, with a related value in another table. E.g. A Items table with a batch value from another table.
I have a form to enter how many of these items has been used and from which batch number they belong.
The batch number is from a dropdown, and batches can be finished(exhausted) and marked such in the table so they no more show in the dropdown.
All this works fine, until, I go back to a entry which was from a batch that has been finished. The combobox is empty although the (Already finished) batch number is mentioned in the table. This is perfectly normal as my query for the combobox is :
Code:
SELECT ItemBatch.ItemId, ItemBatch.ItemBatchNumber, ItemBatch.Finished, ItemBatch.ItemName
FROM ItemBatch
WHERE (((ItemBatch.Finished)=False)
AND ((ItemBatch.ItemName)=[Forms]![ItemMasterForm]![ItemDataSheet].[Form]![ItemName]));
What I want is to show the current batch number as well. I tried to make this query get the current value, but wasn't successful. I tried to make a calculated field based on the dropdown and show its value.
Is there any way I can show the batch number in the datasheet? I have to use a datasheet and not a form, because there will be many sub records for the main form, and having a form will be very uneasy.
I created a navigation form on which I put a form call [frmAnimal Setup].
I then placed one combo box on the Navigation frm Header. I have bound it to its source and it actually queries the tbl and show the right info. However when I select one, it will not let me.
In addition, [frmanimal setup] will not allow me to select a breed although it does query the tbl and shows the right information.
I am creating a query based on two tables: 1) tblClient (only one primary key "ClientID") and 2) tblContactDate (with two primary keys "ClientID" and "ContactDate").
Each client may have more than one contact date.
In the query, I only want the records from the tblContactDate showing for the MOST RECENT contact date of the client only; however, right now the query is producing more than one record for those clients with more than one contact date.
Not sure if I need add some special code to the "criteria" area in the Design View, or somewhere else. Your help is appreciated. :confused:
I have a parameter query built and am curious if anyone knows of a good way to allow the user to define which fields are displayed in the query results.
i tried looking for other threads discussing this without any luck.. not sure if it was my search terms or what. thanks so much for any help..
i've designed a rental database (which seems to do what i want) - it's not perfect....
But i can't figure out how to accomplish this.
If i have a tenant, who has previously had a lease agreement on one of my properties, but then moves out, and then moves into one of my new properties, i can't seem to see how to get access to display just the new lease details.
I've attached a blank copy of the DB with some sample data to illustrate this.
you will see that test tenant has two leases, one expired lease, and one active lease, but on the main form it just shows the expired (original lease)....
Hi all, i have a table called expense that i have tied to a case table... i also want this tied to the employee table, but when i add the employeeID field to the expense table it messes up all my queries that i had previously created... the queries merely reference the expense amount that is located within the expense table... is there something that i am doing wrong? (obviously there is) but i would like to know why this is happening
I have managed to link a report to a form where you can double click on the surname and the report opens automatically BUT I want the report to only show the data from the record that I have double clicked - at teh moment the report is coming up with thousands of pages - one for each record.
Can anyone help me with this - I think it's probably something simple but I can't work it out on my own :eek:
I was creating a program using ms access. consist of 2 table of database called employee and userlevel.. in employee table have ID, name, username, password,userlevel, and others related employee profile.. and in userlevel table, it consist of admin level and normal user level.. Userlevel table allow to differenciate admin and normal user(employee) .. in my program each employee having their own loginID and pass to access their own data.. the problem with my program now is displaying the data that belong to the logged in employee. its mean that it only show the data that owned by currently user that logged in..
Hello everyone, I have a query that runs from the main form when the command button is clicked. It displays the results in datasheet view. I want the user to double click a specific record and jump to that specific record in the main form. How do I do this? Sorry, if this is a dumb question. Please help, my boss is breathing down my neck. :eek: The main form is called Contracts. Each record has a unique ID.
I have a form that when a user fills out the information and select a submit button. It brings up that record in reports in print preview for them to print. The issue i am having when the user enter the information, the report does not show any data until i refresh it. I tried include me.refresh,etc. No luck. I attached the code to make things simpler.
Private Sub Form_BeforeUpdate(Cancel As Integer) If Me.Dirty Then If MsgBox("Do you want to Submit this Contract Form? Clicking No will DELETE ALL ENTERIES,and Log You Off", vbYesNo, "CONTRACT FORM") = vbNo Then Me.Undo Cancel = True Else If MsgBox("PRINT FORM", vbOKOnly, "CONTRACT PRINT") = vbOK Then DoCmd.OpenReport "rpt_Contracts_Main", acViewReport, , "[CONTRACT_ID]=" & Me!CONTRACT_ID End If End If End If End Sub
The reports comes up, but i have to manually refresh it to show the data that was enter.
:( I have such problem : my query works right, but in ComboBox I got results with wrong sort. Query results is: Street 8 Street 8a Street 10 Street 10/12
But in ComboBox data views such: Street 10/12 Street 10 Street 8a Street 8
I have a list-box(Category) and a 'ok' button on the form.
My OK button has the following [Event Procedure]: Private Sub OK_Click() Me.Visible = False DoCmd.RunSQL "Select [Barg Unit],[Medical Option],[Medical Coverage Tier] FROM RetireeCensus Group By [" & Category & "];" End Sub
First of all, is my syntax correct in the above codes? Second, what VBScript codes do I need to add in so that when I click the 'OK' button, a report or a table will show the query results from my 'Select' statement?
I have a database used to track my personal assignments, created about six years ago using Access 2003 on Windows XP. Recently upgraded to Access 2010 on Windows 7. At some point thereafter, I started having the following issue:
When a new record is created, that record gets added to the table, but doesn't show-up in any query, form, or report until after another new record has been added. The most recently added record cannot be located to view or update, except in the table, until after another new record has been added to the table. Queries, forms, & reports now always lag behind by one record.
None of the queries, forms, or reports tested contain filters. I have several multi-user databases that I also support and none of those users have reported having this problem. This is only happening on my personal database.
I've re-created this database once or twice in the past to resolve other issues, but would like to avoid that route this time around, if possible.
Code: Outfits: ID | Top Color ID | Bottom Color ID 1 2 1 2 3 4
Colors: ID | Name 1 Red 2 Blue 3 Green 4 Orange
I'd like to have a query in design view to have the following result
Code: Outfit ID | Top Color Name | Bottom Color Name 1 Blue Red 2 Green Orange
In design view, I can link "Color ID" to "Top Color ID" and "Bottom Color ID" but I don't know how to specify in the GUI to create "Top Color Name" and "Bottom Color Name".
I have a form that I am trying to show in a text box the results of a count query. The query has two fields in which one is a check box. The criteria for the text box field is set to true to list all that are checked. I want the query to show all the records that are true. This works if I run the query, but the result isn't showing in my text box on the form. On the form text box properties in Control source I have =DLookUp("[Run Number]","Control Room Drumctqry"). Run Number is the field that I am counting, Control Room Drumctqry is the query. Any idea as to what I am doing wrong? Thanks,
I have a form that I am trying to show in a text box the results of a count query. The query has two fields in which one is a check box. The criteria for the text box field is set to true to list all that are checked. I want the query to show all the records that are true. This works if I run the query, but the result isn't showing in my text box on the form. On the form text box properties in Control source I have =DLookUp("[Run Number]","Control Room Drumctqry"). Run Number is the field that I am counting, Control Room Drumctqry is the query. Any idea as to what I am doing wrong? Thanks,
I am trying to query my records by the current records selected date then send the results in the body of an email on click. I believe I am close but I think there is a problem with the date format because I am getting 3421 Data type conversion error. Here is what I have:
Code:
Private Sub eMail_Click() On Error GoTo EH Dim dbExceptions As Database Dim rstExceptions As Recordset Dim dbDate As Database Dim rstDate As Recordset
I've just made this query at work, it brings up the results from a database of telephone surveys. about going all gestapo on the table names and codes, I'm unsure as to how told off I could get for placing identifiable images on the internet
query.png
basically I would like to extend this query so it shows the sum of the "CountOfQ1 22" column and also shows what percentage of that total each entry in the "Q1 22" column is.
This will enable me to have results for the day sent to me at home every night at close of business as the person supervising the call centre at the time can run the query and email me the results.
I have a query that is search for fields in a table that are either
1 - High 2 - Medium 3 - Low
I have a query that counts these and then puts the results into pie charts on a report.
However, when there is no "1 - High" value in the table against a paricualr criteria, obviously the quiery has nothing to look for an does not show a 0 value against the criteria but simply omits it (correctly) form the results.
This does affect the pie charts though which I want to show red for High, yellow for Medium and green for Low.
Therefore I need the query to show all criteria search results include 0 values, or to understand how I can colour code the series rather than the segments on the report.