Hi I have two tables. bug and drift. They are linked by a field called sample.
When I try to create a form using these two tables and include the sample filed of the bug table, the form will allow the data to be changed only on those field which are in the bug table and I cannot do anything with the data of the drift table. if i include the the sample field of the drift table, i will get an error message "microsoft jet engine cannot find a record in the table bug with key maching field(s) 'sample'" , when i try to save the record. No fields are locked in any of the tables and forms Any one knows what could be wroing here.
I have made a form with a main form and two nested subforms. The main form and subforms display data to be edited - fields in which data can be added, but no new records need be added. I and two other users have used this form for about two months. Now when we go to enter data, we can still navigate the form but our changes to the fields in question are no longer saved.
I have written a html page that posts a form to a .asp page, which in turn is supposed to write data to a MS Access database. Problem is while my html page works, and my .asp page seems to work fine as well, nothing is being saved to my database!
I'm not sure if its something wrong in my .asp page...
Code: <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% Option Explicit %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
[code]....
or if you think there may be some configuration in my database I'm missing. Just an FYI all the database table columns take empty values.
Looking to have a count function which calculate data in sense like if records found on 1-jan-2014 the it give answer as 1, same as records for 2-jan-2014 it should return 2 and so on .. in short the criteria must look and give same number for same dates starting from 1
I have created a Public Function that would get a new Production Instructions number based off the [PI Number] of Tbl_Production_Instruction table.
I have a form that people will put in all information but the PI Number, then when ready they will click a button to update the PI Number. I place an unbound txtbox that will be hidden, with the control source to =NewPINum(), but when I tested the see if the unbound txtbox was populated with the new PI Number it was blank.can't figure out what I am doing wrong.
Code: Public Function NewPINum() As String Dim vNum As String Dim strYYMM As String Dim getnextPI As String strYYMM = Format(Date, "yy") & "-" & Format(Date, "mm") & "-" If strYYMM = Left(DMax("[PI Number]", "Tbl_Production_Instruction"), 6) Then vNum = Right(DMax("[PI Number]", "Tbl_Production_Instruction"), 3) vNum = vNum + 1 getnextPI = Format(Date, "yy") & "-" & Format(Date, "mm") & "-" & Format(vNum, "000")Else vNum = "001" getnextPI = Format(Date, "yy") & "-" & Format(Date, "mm") & "-" & Format(vNum, "000") End If End Function
The first is called:TypeOfMedia: Left([MediaID],1) Grouped BY Result C D G
The second is called: CountOfProducts: Count(*) Expression Result: 1 15 1
This query has counted the number of CDs, DVDs and Games entered. The first letter of the MediaID fields indicates what type of product it is. A typical DVD entry would be: D2387
I now need to implement the totals on a form with other fields such as the name of the DVD.
The other fields are:
Ptitle: text Type: text Cost: currency Penalty: currency
The trouble I am having is to successfully implement a count procedure where I can have three fields each showing how many of the various products there are, open at the same time.
Would any of my esteemed colleagues out there have a solution to this problem?
I want to be able to use the Count function that will reside in the header of the main navigation form that will count the records in each navigation sub form (of which there are 6 sub forms)
Each sub form has the same primary key which is what I am doing the count on.
I have done this on another form with no subforms by creating a Textbox with this code: =Count([PCNumber])
I have tried to put this in the header of the main navigation form with various itterations, the last being: =Count([Form]![NavigationSubform].[PCNumber])
But what ever I do seems to come up with "Error" in the textbox.
For info, the form names are:
Main form :StockViewsForm Subform:NavigationSubform
PCNumber being the PK I want to count.
Is this possible of do I need to specify the names of the actual forms that reside in the Navigation Sub Form ??
SELECT Count(T_STUDENTS.studentsID) AS res1yes, T_COACHING.COACH1res, T_COACHING.COACH1port, T_COACHING.COACHworkgroup FROM T_STUDENTS, T_COACHING WHERE (((T_STUDENTS.res_vrijstelling)=False) And ((T_STUDENTS.stud_year)="1") And ((T_STUDENTS.stud_coach)=forms!F_cboCOACHING!cboCOACHING)) GROUP BY T_COACHING.COACH1res, T_COACHING.COACH1port, T_COACHING.COACHworkgroup;
It runs fine, untill the moment the count is 0. At that point it breaks the form. How can i tell access to deal with this? Somehow i need to replace the count result with 0 if there are no records that meet the criteria.
And I want to extract the "Submit Date" data and place them into their corresponding fields on a form:
Basically I want to take the Submit Date column from the table and place them (in the same order) in the form. How can I do so? I'm also confused as to what to select for the Control Source in the Form Design.
*Note: both "Submit Date" columns in the form and table are set to Date/Time.
How to count the number of times that the data appears in a certain field (which is [Ema!l]). I have a list of ema!l addresses and I want to find out whether that ema!l address has appeared once, twice or more. I want to add this as a field in a query. I don't want to delete it or anything because it's perfectly fine for the ema!l address to appear more than once, I just want to be able to identify when the ema!l address has already appeared.
If I was using Excel I would use a Countif function to count how many times the data in the specified cell appears in the whole column, and that would give me the number. I'm not use to the language of Access so I can't figure out how to achieve this.
I tried adding a Total row to the grid in the query and then changing the total to 'count' but this just returned 1 for every row.
I have a basic invoicing setup, with a Form (Invoices) and subform (InvoiceDetails).When in the subform, i have a combo box to choose a Product Code (saved in table as PCode).I want now to auto fill in the NettPrice and (Product Description) PDesc fields in the subform row - by looking these up in the Products Table and entering the data into the relevant fields on the Subform. This lookup will be based on PCode.
I tried all sorts of methods and the one i favour, if i could get it to work, is setting up a Function then calling this function from the Default Value property of each field involved.So, for the Product Description field (PDesc), i created a Function as follows:
Function GetDesc () As String GetDesc = DLookup ("[PDesc]", "[Products]", "[PCode] = " & Forms!InvoiceDetails!PCode) End Function
Then i try to call by entering =GetDesc () into the Default Value property for the PDesc field.I seem to have a syntax problem with my function code.I know some of my values like NettPrice need not be fields on my Invoice Details table, but the prices change and I also need to be able to overwrite prices etc when typing invoice.
As you can see the purpose of this function code is to register into the TblLogChanges every single record exclusion or record change made in any form field of my project when the form is active. In other words if the user changes for example the value of the field Color in the form FrmX from Yellow to Black, the TblLogChanges will have added a line indicating: FrmX, type of change (record change or record exclusion), RecordId (in my case CADID), Current User, Date, and a complimentary string showing Field Color old value=Yellow --> Field Color new value=Black.It works fine when the field "old" value is populated (not null). However, if the feld old value is null, meaning, if the field value is originally null, or yet if the field is originally empty, and I fill it up with some data, then the code does not add an indicative line into the table TblLogChanges.
See function code below.
FYI the function is called in both Before Update and Delete events of the form with the following syntaxes: =logChangeFrmCadastro("E") for record exclusions, and =logChangeFrmCadastro("A") for record changes.
I have failed so far to make it happen. Reason is I'm able to read and understand most written syntax but still not good enough to create my own codes since I do not know to use the range of VBA commands and syntaxes available yet. This is a knowledge gap I'm doing my best to fill in.
what function code changes are required so the function be able to add an indicative line into TblLogChanges when the user changes a form field from "empty/nothing" to something?
Code: Option Compare Database Option Explicit Function LogChangeFrmCadastro(strTipo As String) On Error Resume Next Dim db As Database, rslog As Recordset Dim frm As Form, I As Integer
I've read over and over that calculated data is bad, that's fine with me... but here is my dillema...
I have four fields that interact with my calculation in a single form. There is only one table in the database.
AmountF (The stored data in the table) (amount financed) FC (calculated by =[amountf]*.25) (finance charge) Amount Paid (used in calculation of total due) total due (calculated by =[amountf]+[fc]-[amount paid])
The math already works, everything works. I can choose to print the form and it looks great. However, I would like for it to (when I'm done printing the form) somehow save the total due data to the AmountF column in the table. AmountF is in the same line as all the other information, so I would like it to not create a new record just update the old one.
All four of these fields have a text box in the form for themselves.
I've two tables, QA (Quality Assurance) and Instruments. I'm using form to add data to QA.
There's a field in QA, named InstrumentUsed. The criteria is that InstrmentUsed should only accept value when 'status' field in Instruments table shows 'working'. If status is 'faulty' or 'need repair', it should pop up the related error message and cursor stays on the same field.
I've not starting learning VBA yet, so I'm trying to make use of Macro's.
How to use data from another table as a validation criteria for a field in form?
Pops up a MessageBox and stays on the same field, on the form, unless error is resolved?
I have built a nice database that has a form to enter data which logs in product received, there is a combo box on the same form that is linked through the query builder to auto populate the names from the contacts info table (the receivers of the product received) the contacts info table also contains information that is specific to each name such as locations.
As of now I have created a command button that brings me to the form that shows the information fields I need specific to a name, once I get that I have another command button to bring me back to the main form. How to create an additional list box on the main data entry form so as when the name is entered the new list box or text box (which is best?) will auto populate the information I need on one form instead of going back and forth.
Example:
Requester Name [ auto populate name ] currently linked to contacts info table (working)
(New field) Preferred Location [ need to auto populate location ] from the contacts info table (how do you pull locations specific to a contact name from the same table?
I want show the count data in one of my form. So i use Dcount in control source but i get Error for the below 2 fields.
=DCount("[A2p]","[Customer Table1]","[A2p]='No'")
A2p - is field from table Customer Table1 in this i want to count the No A2p is text box format in my table.
=DCount("[DateU]","[Customer Table1]","[DateU]='date()'") DateU - is the field from Customer Table1 in this i want to count records matching the today. DateU is in date format in my table.
I tried to bound the box used count option but not working.
I have attempted to create a chart in Access and it does work to a degree, but I get the strange sample chart in design view and can see charting the data in my database to be troublesome.
I've had a "brainwave".
I'd like the user to have a command button to bring up a form screen or a report screen and for it to have some data in it.
I have a field 'Reason' and it's text box is actually a combo box containing around 9 different values.
I'd like my form/report to list these values then next to it tells the user how many are displayed.
Below is just three things that is in the 'Reason' combo box. I have around 9 different ones in total.Notice on the right I have example numbers. Is there a way to do calculate this?
I have a ICT exam on databases in January for A2 ICT. It is based on a sixth form college. I need to add new units for the courses via a form, with the unit being uniquely identified using a Unit Code
The Unit Code consists of the first 3 letters of the Subject Code, the first 2 letters of the Description of the unit and a number.
Eg Subject ID : ARA001 and Description: Culture will have a Unit code of ARACU1
I'm trying to find a way to automatically create the unit code on the form. The first two bits have been solved fine,however, i have had difficulty of putting the number of the end. It seems easy in practice as i need to find a Unit Code like the one i have on the form but find the maximum number of a identical code and add one to it. I thought if i did
Like "[Forms]![frmaddnewunit]![txtUnitCode]*" as the criteria on a query with the field being Unit Code from the Unit table it would find data like the one on the form but it doensn't.
I thought i would use the data from the query and use Max(Right([UnitCode],1))+1 to get the number and add this to the code in the unit
This formula on the unit code text box on the form solves the first two bits of the problem
but i need to find a way to find unit codes thsat exist similar to the ones that are created and then find the maximum number and add one to it so i have a valid unit code
e.g
if on the form i select Subject ID ARA001 and Description Culture
The unit code will display ARACU.
I then need to find unit codes similar to this (There is one that already exists ARACU1) and find the max number on the end and add one to it
So ideally the code that will be automatically generated in this case would be ARACU2
I have a field called Unit in my table. That field references another table which has about 5 entries. The user can select one on the form.
What I want to do is count how many times each one has been selected so that i can create a chart. The unit names are: North, West, East, South and Main.
i have a table which contains the attendance records for employees. It shows their supervisor their name aemp number and which kind of hours they worked basic, overtime, Been late and absent is all recorded here.
SupervisorEmp NoSurnameForenameCodeValue JENNIFER BUCKLEY200McCormackBridgetOT14 JENNIFER BUCKLEY200McCormackBridgetOT21 JENNIFER BUCKLEY200McCormackBridgetBAS4 JENNIFER BUCKLEY200McCormackBridgetBAS5 JENNIFER BUCKLEY200McCormackBridgetBAS4 JENNIFER BUCKLEY200McCormackBridgetBAS5 JENNIFER BUCKLEY200McCormackBridgetBAS4 JENNIFER BUCKLEY200McCormackBridgetLTAM0.05 JENNIFER BUCKLEY200McCormackBridgetOT14 JENNIFER BUCKLEY200McCormackBridgetOT21 JENNIFER BUCKLEY200McCormackBridgetBAS4 JENNIFER BUCKLEY200McCormackBridgetBAS4 JENNIFER BUCKLEY200McCormackBridgetBAS4
this bben a sample from the table. I want to be able to have the employee name, NUMBER AND SUPERVISOR there just once with the appropiate heading for what type of CODe they have BAS, OT1 as a heading with a count of the number of times they done that particular code
Hi I have a table where is listed all happened faults from a month period. Every fault have start time and end time field and ip field which tells what device has been "broken". Now I'am trying to calculate how many faults has happened in every day. I have make a query from the table which looks like this: "SELECT (DateValue(Table.[start time])) AS date, Count(Table.[IP adress]) AS [faults happened] FROM Table GROUP BY Table.[start time], Table.[IP adress];" And I get this: date faults happened 12.8 2 12.8 1 12.8 1 13.8 3 .. But how I can make my query count together how many faults has happened in every day? So it should look like this date faults happened 12.8 4 13.8 3 ..
I'm trying to create a query that will count records from 2 different tables that are both related to a 3rd master table. e.g. table 1 is the master table and contains records of employees, this then has 2 child tables: customers and products. I want to count the number of customers and the number of products that belong to that employee in the same query so that i can then produce a report without the hassle of sub reports etc. any advice on this would be great
Hello! i am trying to sum the total of ID's by corporate titles in query. In the totals row i have selected 'count' in the ID column and 'sum' in the title column but this doesn't work. I tried the reverse and it also was no good :confused:
Can anyone help - i'm sure its something simple thanks
I wonder if someone could help me with the count function,being as I've never used it. I have two forms, one with a number box called:
Form1![CR2]
The other is called:
Form2![[TotalCR2]
I want to add all the records from Form1![CR2] and put them into Form2![TotalCR2]
I know its going to be simple and I'm pretty sure I should be using DCount or DSum but I am unable to access the help files on my PC at work for some reason. Thanks!
Can anyone help? I'm running a report that shows conference delegates names and the various workshop options they are choosing for an event. What I am trying to do is work out if there is a way to count the number of people who will be in each workshop. I have set up the database so that when someone registers for a workshop, I show this through a Yes/No box (ie, put a tick in the box). So my end report looks something like this:
Name Workshop 1 Workshop 2 Workshop 3 Workshop 4 Person 1 [tick] [ ] [ ] [tick] Person 2 [ ] [tick] [ ] [tick] ….and so on
I have managed to count each column by the following control source: =count([workshop 1]) ; =count([workshop 2]) etc. The problem is the number it gives me is the TOTAL number, not just the number of ‘yes’s’ or ticks.
Is there something I can add to my statement to get the formula to just count the ticks? I tried: =count([workshop 2]=YES (and TRUE), but it still counted the total boxes/lines. Basically I don’t want to include the ‘no' boxes in my count.
ANY HELP anyone can give would be HUGELY appreciated. Thanks :)