I am trying to use one form to manage multiple unrelated tables that share the same field names (i.e. SKU, Name, Description) . My goal is to utilize a combobox or listbox to choose which table the data is sent to.
The combobox in the frmResellerOrders works correctly until I include it in the Navigation form frmMainMenu. Once I include it the navigation form it no longer lets me select a value. I have read numerous articles about using the Forms!YourMainFormName.YourSubformContainerName.Form.YourControlName
However, none of these seem to mention when and where to use it. Do I put it in the query that the form is linked with or do I need to put it in my form somewhere? I have been trying to fix this off and on for over a week now. It is one of the last parts of my database that I need to get finished by Monday!
I have attached a copy of part of my database with some dummy data.
In my quality control database QC techs will be entering in test results. Each quality control entry they put in will have a product and lot number it is related too.
My question is about making data entry easier for the QC techs. When two jobs are being run at once, the techs may have to alternate between which jobs they enter, meaning a different product and lot number. It would be frustrating for the QC techs to enter in a product code and lot number for every entry they make.
Can the lot number field be automatically populated when the tech selects a product? Basically, if the tech selects product A, can the last lot number value for product A automatically populate the field in the new entry?
Edit: Currently I have the "solution" of making two instances of the entry form with each lot number entered on the different one. This allows the QC Techs to use the CTRL+ ' to populate the last record, allowing them to quickly enter the product code, lot number, and date of the job they are working on.
I am creating a data base to handle access requests to a building. All has gone well so far and ive built tables, reports, forms and used queries. However now im trying to get abit more clever and ive hit a bump of understanding/apprach.
Whilst a ninja in Excel, im still working out which is the pointy end in Access.
The database holds all details of access requests inc: Company attending, Individual attending, Access Levels and Period of attendance. This is all done with forms for the users and functions beautifully (ish).
I can run reports on this data, based on queries (there is much more included than above but you get the idea) and generate all the reports I need.
What I wanted to do was add, following attendance to the site, the card details of the AC card they were given for the visit.
My intention was to have a form with three variables: a combobox that would let you select the individuals company and two text boxes to select a date range in. Leaving just say three or four people from that company on that day rather than everyone who had ever atteneded to sort through and add the card details.
The combo box comes from another query that gave me individual company names from the main table.
I thought a date query (as in placing a more than <> or less than criteria vs textbox value on form in the query build section) could be added but I hadnt got that far.
It seems what I have done works backwards (oops), I can adjust the query from the form but get every record in the table on the form to click through to add card details, which will be abit rubbish when i have 1000's of requests building up in the history.
Hi i was wondering, i have two forms in my database.
On one of the forms when doing a combo box wizard i can select the option to "find a record on my form based on the record i selected in my combo box" but on the other form in the same database which i have it does not give me this option.... Does anyone know why this is so... Is it a relationship issue with all the tables???
If it is a relationship issue is there another way around this so i can do this option but without changing the relationships... Any help would be greatly appriciated...
I have a combobox on a form and it shows values from a query. I pick one value and presses a button, then a new form opens with a lot of information based on the value in the combo box. In this combobox I would like to have a value called "All", if I choose this one I want All of the information to be shown. I would like to know how to get this to work (create a question with a term like this: IIF([Forms]![frmMaskin]![cmbAvd]="All";Like "*";[Forms]![frmMaskin]![cmbAvd])). When I do this, I se nothing. Please give me some advice.
I'm building a filter using comboboxes and I'm having trouble with two of them. One is to filter by records that are completed or by records that are not completed. The other combobox is to filter by records that have comments or by records that have no comments.
Filter7 Row Source Type: Value List Row Source: Completed;[tblMainData.Status]='Complete';Not Completed;[tblMainData.Status]<>'Complete' Column Count: 2 Bound Column: 1
Filter8 Row Source Type: Value List Row Source: Comments;[tblMainData.Comments] Is Not Null;No Comments;[tblMainData.Comments] Is Null Column Count: 2 Bound Column: 1
The VBA Code is: ================== If Me(Filter7) <> "" Then strWhere = strWhere & " " & Me.Filter7.Column(1) & " " & " And " Debug.Print strWhere End If If Me(Filter8) <> "" Then strWhere = strWhere & Me.Filter8.Column(1) & " And " Debug.Print strWhere End If ==================
I'm getting an error on building the strWhere variable. Can I use filter criteria statements in a combobox column?
I have a basic design question that I am not sure how to address.
I am trying to build a simple data entry database with a form to take input from the user, store the values in a table. Once the data is gathered into the table I want to use this table to print a report of each record (entered using the form before).
To achieve this objective, I made a form (frminput) with some text fields. Most of the fields on this form are Bound fields to a query (qrymaster). One of the field is a Combo box (whose value is shown from another table). I have designed the RecordSource of this Form to be a Query (qrymaster).
This is a basic Data Entry form where the user selects the Combo box item and based on what he selects, some of the fields in this Form gets pre-filled. The rest of the fields on this form are bound to the query "qrymaster" and the user has to type these fields manually.
Now, I want a Save button here that would save all the values on this form to the table "tblmaster". How do I do this efficiently keeping in mind all the normalization laws on the database?
At this time, behind the Save Button, I have included a SQL statement to insert all the field values into the table "tblmaster".
I am sure there is a better way to do this. Can someone point me in the right direction please?
I would like to let vba select all (one after the other) values in a combobox and run a query. The code has to be run using a Do While Loop for which I already made the condition.The reason I want to automate this is to allow the user to quickly add new links in the database. The combobox is used in multiple queries.I rather code it than make new queries for this situation because it involves many queries that would have to be added.
I have a contineous form with a combobox for each record and i have a button to select the first item in the combobox then to refresh the list in the combobox .I want to creat a one button to select the first item in the combobox then refresh the list then go to the next record and select the first item on the list
I am trying to get two different fields to autopopulate when I select a choice from a combo-box on my form.
I have a form called IncomeRcvdFrom, which takes its fields from the table "IncomeRcvd"
In the form, I have three fields that need to relate to each other and auto populate.
The first field is called "IncmType", which comes from a different table called "CategoriesList". There is another field called "IncmDescr" which also comes from the same table. The third field, called "Category" is a list box in that table that comes from another table called "CatType".
All three of these fields also are list boxes in the table "IncomeRcvd", where the source of these fields come from the "CategoriesList" and the "CatType" tables.
What I am trying to accomplish is so when someone selects an Account, or "IncmType", it auto populates the "IncmDescr" field, as well as the "CatType" field on the form.
So far, I have gotten the Account or IncmType and the IncmDescr fields to autopopulate each other, but the Category field either says "Name?", or I get the "type mismatch expression" error message. I also accidentally got the field to work one time, but it would only display the ID Key field and not the actual wording in the rows (i.e. Misc. Payment, Royalty, Rebilling, etc.)
I have checked my relationships, my control sources, and still can't get it to work.
Folks, can someone help me on this? I am not sure why the select query inside this procedure is not working. Here is the that routine:
Public Sub temp() Dim strDocName As String Dim strTableName As String Dim strTbl As String Dim aot As Access.AccessObject Dim strSQL As String Dim rpt As Report Set rpt = CreateReport
strTbl = Forms!frmSearchBoilerGuar!cboTypeOfGuar
For Each aot In CurrentData.AllTables If aot.Name = "strTbl" Then strTableName = strTbl End If
Basically, I am trying to select a table name from the combobox and then use that table name for my query. Then I want to use that query as a recordsource for my report.
I have a form where i select via a combo box if a product has been inspected, if it has, additional controls are then made visible.
If Me.Inspection_Completed = "Yes" Then Me.Date_Inspection_Comp.Visible = True Me.Date_Inspection_Comp = Me.Dateinsp Me.Inspector.Visible = True Me.Qty_Inspected.Visible = True Me.OK.Visible = True
[Code] ....
I tried to put this in a function so i could call it on load, or on current etc, but cant seem to get it to work, apparently you cannot use the me. in a function.
I'm creating a Form called Pharmacy where I can select a [Diagnosis] from a combo box in the form. This combo box source references a table called tblDiagnosis where each Diagnosis also has a multi-valued field called [Indications].
The Pharmacy form also has a multi-select listbox with all possible Indications. I would like to write a VBA code such that when a Diagnosis is selected, the Indications for that Diagnosis are automatically selected/highlighted in the listbox on the form as well.
As such, by selecting a Diagnosis, all the indications attached to that Diagnosis will automatically be selected; however, if additional indications are needed, they can still be selected afterward.
I know that there is a function Me!Listbox.Selected(i) = True, where i is the row of the entry in the listbox. However, the i in the listbox does not correspond to the ID of the Indication. I think that if there is a way to select listbox items by name, that would be much more efficient.
The reason I have a listbox, is because this listbox of Indications then references another table called tblDrugs where all drugs that are approved for the selected indications selected are filtered and displayed.
Hi in the attached database there is a form called "with table select".
I want to be able to select any one of the three tables i have in the top combo box. When this is done the bottom 2 combo boxes will display the relevant data if needed (look at the other form "myform" to see the fields that are requseted).
I have a login form with a combobox which derives its list of values from an EmployeeRecord table (i.e., last name, first name, securityID, job grade and record number): only the last name and first name appear in the list. (I swiped some VB code for a multiuser login form and routine from several previous posts.)
After it performs the security validation/authorization, it then opens a navigation control form based upon the user's job grade. It runs after the click button event. To this I would like to update another table, LoginEvent, with the last name, first name and record number from the combobox selection, and also add the time and date of the click.
I have a databse which uses a query and a form to filter records from 1 table into a report. It works well, however the way in which it works currently means i would need around 15 forms as there are (going to be) around 15 tables.
What I would like to do is add a combo box at the very top of the form to select the source table for the other combo boxes on the form (hope this makes sense!!).
This link is a test version of the database (Access 2000):
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.
Form - record source - select a table that when the user enter a value in the field of the form it gets place into the designated table (select a table). my problem is that I have two fields in the form, one field from the data entry is suppose to go to the train table,and another field the data entry is suppose to go to the station table. if I have the form's record source have a designated table for the data entry.It doesn't have two tables for the data entry.
I would like to select a record from my combobox dropdown list and have that record populate in my subform. Currently, I am only able to select the 1st record at the top of the dropdown list to appear in my subform. But I would like to select any record from the dropdown list and have it populate my subform.
I have a listbox on a form displaying records which can be filtered via a number of comboboxes. These comboboxes allow the user to select "<ALL>" or a specific value from the list. It all works perfectly.
However, I would like to be able to select a filter value of "Null" on one of the comboboxes which would display those records without a value in the relevant field. How can I do this?
The following (simplified) code is what I'm using:
SQL for the results listbox: SELECT qryClientSearch.ID, qryClientSearch.Name, qryClientSearch.AccountManager, qryClientSearch.AccountMgr FROM qryClientSearch WHERE ( ((qryClientSearch.ID) Like fCboSearch([Forms]![frmClientSearch]![cboSearchName])) AND ((qryClientSearch.AccountManager) Like fCboSearch([Forms]![frmClientSearch]![cboSearchAccountMgr]) Or (qryClientSearch.AccountManager) Is Null) ) ORDER BY qryClientSearch.Name;
SQL code for the combobox filter: SELECT qryStaff_All.ID, qryStaff_All.Nickname FROM qryStaff_All UNION (SELECT "*" AS ID,"<ALL>" AS Nickname FROM qryStaff_All) ORDER BY qryStaff_All.Nickname;
VB Code in Combobox Search Function: Public Function fCboSearch(vCboSearch As Variant) If IsNull(vCboSearch) Or vCboSearch = "" Then fCboSearch = "*" Else fCboSearch = vCboSearch End If End Function
For those that have noticed I have a "Or is null" criteria on the AccountManager field in the result set. I want to take this out and allow the value "Null" to be selected on specifically.
I have a small database with 4 tables that I am using for the current problem. The tables are call, parents, mailman, orders. Call and parents are related by the call ID (a primary key in the Call table.). Mailman and orders are related by a Unique Id (a primary key in the mailman table.).
Forms involved are frmmain and frmsub.
Frmmain contains the call table information in the main form and parents information in the subform.
When a user enters a call with call ID and enters the operator name and parents information in the sub form, When a user clicks the OK button on the main form, necessary changes should take place if they enter the case type in the sub form part of parent information as ‘missing information’ or ‘missing link’ then the parent information with fields first name, lastname, case type, operator information should be inserted into mailman table in appropriate fields.
Simultaneously a record should be inserted into orders( after the record is first inserted into mailman, since both tables are linked with unique id) with the following information. Orderid being autonumber. Uniqueid from the mailman table. Orderdate system date. Ordertype should be “Mailman”
I have a basic database design, well I think so anyway. It only has two tables:
1. tblClientInfo 2. tblNotes
Basically each client has multiple notes/comments that can be linked to its record, hence the tblNotes table. The two tables have a one-to-many relationship, being that each customer can have many notes.
I then have two forms:
1. Claims Loss Form 2. tblNotes_DatasheetSub1
So I can enter multiple notes for each customer. The problem I am having is with the report output. It wants to print every note (record) that is linked to the customer. I just need it to print the most recent note for each customer (It would save a lot of wasted paper).
Example of a print out of what it is doing:
John Doe - 123 Easy St - Notes 1 (Most Recent Note) John Doe - 123 Easy St - Notes 2 (Previous Note) John Doe - 123 Easy St - Notes 3 (and so on...)
It is printing duplicates of the same customer by adding the additional notes for that same customer on a new line.
How can I tell it to only print the customer one time in the report, and most importantly, to only use the most recent note that is linked to the customer?
I tried using DMax("NoteDate","tblNotes"), but this only returns one customer with one note. I need it to do that for each and all customers.
I have successfully ran a subquery (two queries with one linked to another) by following detailed instructions from this page I found: [URL] .... It works, but the problem is it only shows the latest date for each note, not the actual contents of the note. I feel so close with this option, but so far at the same time.
The TOP n records per group looks promising that I found here: [URL] ...., but I honestly don't know how to implement it correctly in my SQL. I am very much still learning Access and apparently have stumbled into something that is much more complicated than I had originally imagined. I just assumed I could filter the duplicates out, or tell access to print the last or most recent note record for each customer.