I have a serial no combo box which displays serial numbers available for shipment. What i need is some way to make the combo box show the values 'serial numbers in stock' (simple sql) when the [tocompany] is not 'CVP' and to show 'serial numbers out' (another simple query) when the [tocompany] is 'CVP'
Basically i need to change the row source depending on the value in the [tocompany] field.
Hi, Best to have a look at attached relations picture. Basicly this is what I'm wondering about: I add a new customer who bought a product from a specific supplier. That unique combination gives me the right on commission. From company A I get, let's say 5% of the capital. Company B gives me 4,25%
Products are insurance policies, so at certain products you are insured for a capital i.e €100.000,- Percentages given are to be calculated of that capital.
So I have a lot of possibilities here which determines my provision. What is the best way to handle this ???? I have no clue where to start.
The field [Polissen.Provisie] is now manually filed in on the Form where I add all details, which should remain possible (sometimes there are different agreements concerning the fee) Hope it's a bit clear.. Please ask if more info is wanted.
I am trying to update a table with the value of a text box on the form where the table to update is as selected from a combo box on the form.I keep getting the following
Error message: Run-time error 2465 Microsoft Access cant find the field & table_to_update & referred to in your expression..
But really can't see what I've done wrong. Have checked that the table_to_update string does contain the name of the table so guess it must be sql..
Code: Private Sub Command91_Click() Dim table_to_update, sql_string As String table_to_update = Me.Combo49 Debug.Print table_to_update sql_string = "UPDATE [" & table_to_update & "] SET [" & table_to_update & "].[Project] = """ & Text89.Value & """ WHERE [" & table_to_update & "].[ID] = " & Forms![T_entity]![" & table_to_update & "]![ID] & "" db.Execute sql_string End Sub
I'm pretty good with setting up a very simple database such as inventory, profiles, etc.. However I'm creating a database to keep track of a football (soccer) team's players and match statistics.What I have so farsample attached)
Tables: * Players - PlayerID, Fname, Lname, position, goals, assists, etc (all details regarding a player) * Position - Positons (Table containing positions eg: defender. Data is selected in player's form as a combo-box) * Competition - Competition types (Cup, League, Friendly. Data is selected in Match's form as a combo-box * Venue - similar to Competition table * Opponent - Similar to above two tables * Match - MatchID, Competition, Venue, etc (form corresponding to table attached)
Forms: * Player form * Match form
Now as shown in the sample, I choose players using the combo-box. Then whatever stats they had during the match are entered on the fields provided. How to link the player (selected using combo box) to the stat fields (goals, assist, YC, etc).
I'm really hoping this is just a little bit of code here, but here's what I'm trying to do, without success so far...
I have a cascading combo box field called [Name], which is linked to a table that only has 3 columns, ID, Name, and Number. The combo box displays the Name column, with the other 2 hidden. When a name is selected from the list, the neighbouring field [Number] is auto populated with the Number column in the combo box. This works beautifully in saving some data entry time. My issue, however, comes when I try to export data into and Excel format. The two fields, [Name] and [Number] display as numbers instead of their values. What do I need to do so that the names "stick" as words, not as numbers?
I know this must be related to the hidden ID column, and that forms don't store any actual data. I tried to modify the table design, but then it throws off the auto-pop function on the form. I thought it may have something to do with joining the table fields to each other, but I couldn't get that working either. Any suggestions would be welcome. Thanks.
I'm stuck! I want to create a form which has a combo box where you select someone's name, and their address appears in another text box on the same form. The names and addresses are in a table called "cardholders".
I'm doing separate combos for first name, surname cos I think that's the only way you can do it.
The fields in the table are credit_add, credit_name & credit_surname. The combos are called "cardholder name" "cardholder surname" etc. This is the code in the text box where I want the address to appear:-
I'm trying to sort and filter a continuous form. I want to sort by descending and ascending, but I also want to have a combo box for filtering. For example, there a combo box for sorting with Value List as the RowSourceType, the list would be "Ascending" and "Descending", and there should be another combo box to choose the field to be sorted with RowSourceType as Field List from a query.
My field names are: "LastName", "FirstName", "MiddleName". But I want them to appear as "Last Name:, "First Name", "Middle Name". I want to be able to change the display of the field names within my combo box which should come from my query. How is that possible? I already tried to put caption in the properties but it didn't work.
I'm working on a table for work which will serve as a database of bins and the products currently in those bins, as follows:
ID Bin Amt Product 1 34 25 110001 2 33 15 200005 3 32 23 110003 etc.
Basically: employee A will use a form to update "Bin 34" (ID=1), with information (Amt, Product) until it is emptied by employee B and cleared using a separate form. No new records will be made or deleted, just the adjacent fields (Amt, Product) cleared and filled in and cleared again over and over.
What I'm trying to figure out is, when employee A clicks on the combo box on his/her form to select a Bin and enter information, how can I filter what is listed in the combo box to display only those bins which have no values under Amt & Product. The real-world risk of overwriting a bins fields before it has been cleared by employee B (who physically empties the bin) can be extremely high monetarily so I am trying to reduce that risk by eliminating it from the combo box until employee B has cleared those fields.
I'm trying to create a combo box that takes its values from a field in a table, the thing is that this field has duplicates because:
* The table is a qualification look up table * It has 3 fields: QualificationID (autonumber), Qualification(e.g. Bachelor), Programme (e.g. Science) * E.g of duplicate values (this is not a problem as it is necessary) Bachelor of Science, Diploma of Science, Certificate of Science
What I'm trying to do is create 2 single-columned combo boxes that are a parameter for a query and it's working except the combo boxes show duplicated valuesIs there a way to get the query that is the row source for the combo box to eliminate duplicates?
In a form, I am using two comboboxes per record (i.e. when you add a new record, two more comboboxes for that record appear).
My goal is to have the second combobox show entries specific to what the first combobox was, with certain caveats (see below).
My current approach is using three tables - tblTypes, tblOptions, and tblEntries. tblTypes would store the different types of entries. Each of the types in tblTypes would contain options depending on its ID.
Basically, the first combobox will list the data in tblEntries and the second combobox will list the data in tblOptions, depending on what "Entry" was selected. New "Entry's" for the first combobox would be created in tblEntries, where the ID in this table would indicate what "Options" are available for that entry. As shown in the sample table below, I want to allow more than one entry with the same "ID" (i.e. there could be more than one entry with the same options, but the entry name would be different.)
A sample of what the tables would look like is below:
tblTypes --------- ID |Type 1 TypeA 2 TypeB 3 TypeC
Is this approach sound? If so, how would I create the comboboxes to use with this set of data? I tried doing so but ran into a certain problem - that is, the first combobox doesn't allow you to "select" entries with the same ID - it lets you select the first one, but no other... (using a query that simply selects all of the entries and its associated ID - I used the ID to populate the second textbox appropriately.
If this approach sounds unreasonable, how would you approach it? And after creating the tables, how would you go about setting up the combo boxes?
I have a table machine with fields: ID(PK)model ( lookup column to machine model)serialnotype
Then a table meter reading: IDmachineserialno (lookup column to tblmachine/serialno)readingdatetotalcounter
I want it to be like when i press lookup column in tblmeterreading/ machine serialno....it shall show the machine serial no|model in the popup combobox.
Instead it shows my machine serialno|id,
for example: when I select the machineserialno. a combobox shall show: s/n:221233 | sony
I have a cross-tab query that is filtered on user-defined date range using a where condition of:>[Forms]![Reports_Menu]![txtFilterDateFrom] AND <[Forms]![Reports_Menu]![txtFilterDateTo]
the Query functions perfectly. The report based on that query, however, only functions with a DateFrom that is before 1/28/14 and a DateTo that is after 2/27/14. If I enter a date in either field that is outside of those ranges, I get the following error:The Microsoft Access database engine does not recognize " as a valid field name or expression.I have defined both of my Query Parameters as Date/Time in the Xtab query design.
I have several comboboxes (6) on my form.How to populate these comboboxes with values depending on selected value in previous combobox.
Example.Lets say that you select value "Audi" in combobox 1, then available values in combobox 2 should be "A4","A6","TT" etc. and if you selected "BMW" in combobox 1, then available values in combobox 2 should be "3-series", "5-series" etc...
I would like to set up rules/constraints such that the value selected in combo box A determines the available values in combo box B. For example, "Combo box A" is bound to the [PartnerType] field and "Combo box B" is bound to the [PartnerRole] field. Let's say that the two choices in Combo Box A are "LLC", "LP", and "Corporation". There are 5 possible choices in Combo Box B: "X", "Y", "Z", "Q", and "U". If a user selects "LP" in Combo Box A, I would like Combo Box B to only show choices "X" and "Y". And if a user selects "LLC", only choices "Y", "Z", "Q", and "U".
Similarly, I would like to set this up so that Combo Box B is not initially visible--it becomes visible when a user selects "LLC" or "LP". If a user selected "Corporation", Combo Box B would remain hidden.
I have a main form that filters data in a subform based on selections via combo box users make on the main form.
So I have the 'department' and 'manager's name'. If someone selects 'Human Resources' from 'department' combo box, then I only want to see the managers that are in the Human Resources departement when I drop down the combo box for 'manager's name'. Currently I'm seeing all the managers and a user can select a manager that is not in human resources and get no data returned. I prefer for him to get a list of those that are in that department only. The source of the combo box is a query.
Once a supplier name is selected from the combo box i only want it displayed that suppliers products in the subform, subform. (products combo box) I can get a basic query to show these results but can get the combo box to do the same.
I need for Access only to sum the "hours worked" of my payroll data, only if another field, "pay code" meets a certain criteria.
In Payroll, some codes are used to designate actual hours worked like REG (Regular Hours) and like OTS (Overtime Straight) while other codes are added as "premiums" to these hours and do not mean that you actually worked those hours, like OTP and HOD (Overtime Premium & Holiday Premium). The hours are only added as a reference to the actual hours worked they are attached to. Their units should not be counted as hours worked.
I want Access to 1) Group By Cost Center, 2) Sum "Hours Paid" that are tied to a REG or OTS (only), but 3)Sum the Earnings for all pay types.
Basically, (in excel-like terms: Hours Paid Column= SUMIF of Paycode = REG OR OTS. But Earnings Amount Column= Sum of all Paycodes)
Cost Center Job Type Hours Paid Pay Code Earnings Amount
I have several result fields which are all drop down lists. I want each result field's drop down list values to be different depending on the selected value of the Test1 drop down list.I came up with using the .rowsource keyword. My syntax seems to be fine but I'm not getting any values under the result fields when I run the form.Here is my code so far:
Private Sub Test1_AfterUpdate() If Me.Test1 = "Stress Echo" Or Me.Test1 = "Stress SPECT" Or Me.Test1 = "Stress PET" Or Me.Test1 = "Stress MRI" Then Me.Test1Result2.RowSourceType = "Value List" Me.Test1Result3.RowSourceType = "Value List"
I have some combo boxes on a form which are set to display all the distinct values from a field in my database. If any record has a blank in this field, then a blank entry appears at the top of the list box. Is it possible to set blanks to be excluded?
I have a combo box acting as a filter for a form with the following row source:
1;2;3;4;5;6;7;8;9;10;11;12
It is related to a field which has the following VB code:
If Not IsNull(Me.cboFilterPeople) Then strWhere = strWhere & "([AvailableNoTickets] = " & Me.cboFilterPeople & ") AND " End If
...basically I need the combo box to offer values of 1-12 but only return results if the value selected is less than the the value in the corresponding field.
need help., have a form, have put a combo box to display values from another table, works ok, but when a type a new value, it displays 'not in list', so how to add the value to the table without opening the other table or any other suggestion, should i select values in combo box from a query... :eek:
I am having trouble getting information from a combo box to pass the data through some code.
The code is:
Private Sub ListBoxFind_AfterUpdate()
If ListBoxFind = 141 Then Me.FilterOn = False Else: Me.Filter = "[Assessment ID]= ListBoxFind" Me.FilterOn = True
End If
End Sub
I've tried Me.ListBoxFind, Me.ListBoxFind.Value, and ListBoxFind.Value. In all cases, a message box pops up asking for ListBoxFind (in this iteration) and then the filter works with the value I type in. It just seems that the value from the ListBoxFind never gets into the code. ListBoxFind is a combo box with four columns and the value bound to column 1.
How can I specify the list that appears in a combo box by programming it with VBA. I have eight unbound text boxes on a form and I want a combobox to generate its drop down based on the values in these boxes. I think I'd have to create 8 variables and take the values from these text boxes and assign to the variables. The bit I get stuck on is how to make these variables appear in the combo box list.