Block Addition Of Duplicte Records

Nov 8, 2004

I have a table which has a primary key of 3 fields. Each individual fields is defined with duplicates OK but I want to block a record being added where the primary key value exists already. How can this be done - the way I have set up the database Access does not automatically stop this as I thought it might. Do I need somw vb also??

View Replies


ADVERTISEMENT

Addition

Jul 25, 2005

hi, i have a form which shows all of the transaction that have happened in the business, a field in the form is 'logged by'. The 'logged by' field records the name of the person who completed the transaction. For monitoring the employees performance i have created a query which shows all of the transactions each employee has done, ie there is a promt for the users name to be typed in, then all there transactions are brought up. I now want to produce a report off this, but with the total of transactions the particular employee has done at the top of each page of the report. Basically i want the value it says in the record selectors at the bottom of the record, the total number of each employees transactions. I have tried doing a calculation in the query, adding the amount of auto numbers up, but that doesnt work. Not really sure where i should start from..any tips? :confused:

View 1 Replies View Related

Addition With 0

Feb 28, 2008

My update function does not always work properly, especially when one of the fields is 0 or blank.How could i improve my function so that when addding wih 0 not to give 0 ?

My function is the following:
Public Function dummy()
StrSQL = " UPDATE (products1 INNER JOIN products ON products1.Productid = products.Productid) INNER JOIN [Order Details1] ON " & _
" products1.Productid = [Order Details1].productid SET products1.items1 = [order details1].[quantity]+[products1].[items1]"
End Function

View 1 Replies View Related

Addition According To ID

Feb 11, 2015

I've a access table like below

I want to make a query which will first findout the duration of time by "Starting-Ending" and then add the result according to ID. For example below

ID Duration
1 17:05
2 14.30
3 7:00

View 5 Replies View Related

Text Box Addition

Jun 8, 2005

I have a form. Is there a way when you click the record selector at the bottom of a form it will out increment the text box.

heres what id like to do:
txtnum = 21
hit record selector.
goto record 2
txtnum = 22
hit record selector
goto record 3
txtnum = 23

Is this possible? Also these are new records that the record selector is choosing. So they will be blank.

View 1 Replies View Related

Promotions And Addition

May 24, 2005

Hi all,
I have a table with the number of existing staff per department separated by their corporate level. I am able to use a query to display the number of staff per month(Mth1=ExistingStaff..so on).

Since there will be staff changes such as promotions or new staff additions, I need to cater for that. Thus, I created separate tables for each case.(tblNewStaff & tblReclassStaff) The idea is to use a form to allow the users to choose which staff to promote (reclassification in corporate level)where the user just has to specify which month the change is in. A separate form is used to add new staff.

However, I am having problems trying to figure out how to make changes to the Number of Staff per month after such changes. New staff are added as new records while reclassifications will alter the current numbers. Both has been dogging me.

Is there a way to dynamically generate this through a query? Or is there a better way to go about doing this? The numbers collected will be used to calculate incremental salary etc...

Thanks for any help! My brain is fried after trying to solve this problem the past two days...

View 3 Replies View Related

Addition Query

Dec 14, 2006

Hey everyone,
I have a form that acts as a survey asking 11 questions total. Each field in my table is called material1, material2, ect. I have a total field in my table that I would like to be the sum and was told that I have to do this through a query. My only problem is when i query it only gives me the sum of Question 1, 2 ect and does total them all. Can someone nudge me in the right direction as I am relatively new to this. i appreciate everyones help on this forum.

View 5 Replies View Related

Addition Within A Query

May 31, 2007

I have a query which returns selected rows from my table, one of the columns in the table is price.

I want to total the price into a text box on the form and run the query in the 'on current' event of the form so it recalculates depending on the record

can anyone give me a pointer please?

thanks

View 4 Replies View Related

Addition From A Text Box

Sep 11, 2006

Hey guys, I'm trying to set up a small inventory database. On my form i want the user to be able to add and subtract from the item amount by typing in the text box a number, if the number is positive then i want it to add it to the table's existing number, if the number is negative then i want it to reduce my existing number. The number in the table will be contained in a different text box on the form. I'm sure i need to do some sort of expression builder, preferably upon enter. and i'm not sure if the form would need to refresh for the number to update? Could any of you guide me to the correct path? Thanks in advance -John

PS oh after it updates i would like it to clear the text box and then redirect focus to a different box but i think that is just basic coding

View 3 Replies View Related

Addition Problem

Dec 17, 2004

I have records that go by name(cfr_Name) with a charge amount(cfr_charge). Now the charge can have up to 5 diiferent charges per name. Most likely it will be the same charge 5 times. i dont want access to add the 5 charge amounts i want it to dispaly one value. So if it is 20.00 display 20.00. But if the person appears again with 5 records and a charge of 30.00 i want it to display the persons name and 50.00? so i am adding only two values not 10. If the charge field has a value of 20.00 for 5 records the vaule is 20.00. so if one set of 5 records has a value of 20.00 and another set has 30.00 the total in query would be 50.00

View 3 Replies View Related

Dropdownbox Addition

Aug 1, 2006

I want to have a dropdown box in a form but allow additions to be made, but after they are made, instead of them not showing up in the box like usual, I want them to become a part of the list. Plz help! Thanks

View 1 Replies View Related

New Kid On The Block

Jul 13, 2005

Hi-

I am a self taught beginner in Access applications, so excuse my lack of expertise and terminology. From reading through this forum, I realize how far I have to go. I am not a techy by any means.

My question: I have a database that keeps track of the delinquent taxes for our Town. One of the reports is set up from 2 queries, then 2 related tables (beginning balances and payments made). The query calculates the balance of each account based on the beginning balance minus the payments made, and returns a report which shows each account balance, and then another query returns a report showing the total balance of all the accounts due for the date the report is generated.

I am wondering if there is a way to generate the balances due on a previous date. For example today is July 13, and I want to know what the balances were on July 1. Both tables have a date field- beginning balance has a start date, and the payments table has the dates of any payments.

Thanks in advance for any advice

View 6 Replies View Related

Addition Of Data In Two Tables

Sep 9, 2007

i have two tables - all fields are same in two tables.

Table1.salary, Table1.Interest, Table1.Bonus
Table2.salary, Table2.Interest, Table2.Bonus

now i want to add these values and put in a thirs table.

Table3.salary=Table1.salary+Table2.salary
Table3.Interest=Table1.Interest+Table2.Interest
Table3.Bonus=Table1.Bonus+Table2.Bonus

pls help me.
can i do it with help of Query, Macro or any other method.

View 1 Replies View Related

Addition Of Data In Two Tables

Sep 9, 2007

i have two tables - all fields are same in two tables.

Table1.salary, Table1.Interest, Table1.Bonus
Table2.salary, Table2.Interest, Table2.Bonus

now i want to add these values and put in a third table.

Table3.salary=Table1.salary+Table2.salary
Table3.Interest=Table1.Interest+Table2.Interest
Table3.Bonus=Table1.Bonus+Table2.Bonus

pls help me.
can i do it with help of Query, Macro or any other method.

View 2 Replies View Related

Addition With Null Values

Feb 28, 2007

Hi all,i am running a query that (as part of it) returns a total time.. using a formula i found on this site. this formula uses a start and end time and works wonders. works!IIf([StartTime]<[EndTime],DateDiff("n",[StartTime],[EndTime]),1440-DateDiff("n",[EndTime],[StartTime]))/60my problem however is an option that i need my users to have to enter a time not based on a start end time, but a "OtherTime" if u will. (ie they have 4 hours instead of writeing 1:00 - 5:00) already changed this from default value null to 0... (which i didnt wanna have to do cuz it messes up the query)Doesnt Work(IIf([StartTime]<[EndTime],DateDiff("n",[StartTime],[EndTime]),1440-DateDiff("n",[EndTime],[StartTime]))/60)+[OtherTime]i want the total time in the query to show the 4 hours, but it is leaving it blank. i am guessing that it is because my start end times are blank(null) is there a way to add a if statement into a query expression that will bypass this? Tried, but thats invalid in a query expressionTotalTime: If IsNull [StartTime] Then =[OtherTime]Else IIf([StartTime]<[EndTime],DateDiff("n",[StartTime],[EndTime]),1440-DateDiff("n",[EndTime],[StartTime]))/60+[OtherTime] end if

View 2 Replies View Related

Field Addition Complication

Aug 15, 2005

Hello again...

I got almost everything working on the form except for the Grand Total feature.

I tried the

=[field1]+[field2]+[field3]+[field4]+[field5]+[field6]+[field7]

and so on and so forth to the point it would add all the fields up into a grand total.

The only problem I run into is it won't add them up unless there is at least a value of $0.00 in the field. Which makes it look VERY cluttered since on average only 1/3 of the forum will be used regularly.

Is there any way to make it show the grand total even if a field is blank?

View 9 Replies View Related

Block Go To The Next Record

Oct 18, 2005

What is the condition or how should I write a VB code to block the command go to last empty record? I have a form which has three buttons : Go to Previous Record, Go to Next Record and Add New Record. If I add a new record, and I press "Go to Next Record" well, it goes to the next empty record this means it does the same job as the "Go to Add New Record" button. How can I stop this happen?

Thanks,


Le

View 2 Replies View Related

Help Me Block Out The First 5-digits Of The SSN

Mar 13, 2006

I hope someone can help me. I have a report that prints out with the customers social security number on it. I need to change it so that only the last four digits of the SSN show, so it would like something like this XXX-XX-1234. I still want it to keep the full SSN in my Table though so we can search for the customers info with the SSN.

Is there a way that I can change it on the report only and not mess up any other forms that I have it on? Any help would be awesome!

View 4 Replies View Related

Address Block?

Oct 20, 2005

I have a form for all my clients, and currently there's a separate field for each part of the address. This does not make it easy to cut and paste an entire address block. I therefore created an unbound text box with the control source as:

=[FMT-NAME] & Chr(13) & Chr(10) & [Pref1] & Chr(13) & Chr(10) & [Pref2] & Chr(13) & Chr(10) & [PrefStrt] & Chr(13) & Chr(10) & [PrefCity] & ", " & [PrefState] & " " & [PrefZip]

This works ok, but if someone doesn't have anything in the fields [Pref1] or [Pref2] it leaves blank lines. Is there a way to code it so that I can have a complete address block? Thank you.

View 4 Replies View Related

Quick Addition To A Query Statement

Jul 29, 2005

I have a query statement:

Final Tax Free Amount: IIf(Left([Final Tax Code],1)="k",Right([Final Tax Code],Len([Final Tax Code])-1)*-10-9,Val([Final Tax Code])*10+9)

If I wanted to include: If final tax code = BR or NT then = 0. How can I add this to this statement?

thanks

View 1 Replies View Related

Record Addition To Trigger Sendobject

Sep 18, 2006

I am new to MS Access, and I am wondering if there is a way for Access to automatically send an email to a defined address everytime a record is added to a specific table? I have created an escalated issue table and I would need an employees manager to be notified automatically when a new record has been added to it.

Please help

Thanks

View 1 Replies View Related

Addition To Table Messes Up Query

Feb 23, 2007

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

View 14 Replies View Related

Forms :: Limit The Data Addition?

Jul 16, 2013

I have a split design form, where user can select on any row and column of the spreadsheet view of the form and edit the data. Now, I want to write a code to limit the data addition(Row addition) to a certain number. But I still want to be able to edit the previous records added to the form.

I used Me.AllowAdditions = False, but when I want to select the previous records, it gives error:"You cannot go to specified record".

View 2 Replies View Related

Block The Colums Width

Sep 25, 2006

I have a form displayed as data sheet, how can I block the column so that the final user will not modify the width of the columns?

M

View 1 Replies View Related

Object Variable Or With Block Not Set...

Oct 12, 2004

I need to export a table as a text file but using the outputto or transfer text options do not produce the file format I want. If I export the file as Excel and then save it as text it's OK so I copied the following code to automate the procedure but get an error 'Object variable or With block variable not set.

Can anyone help?

Function Export()

Dim objExcel As Excel.Application

DoCmd.OutputTo acOutputTable, "MyTable", acFormatXLS, _
"c:dataMyExcelFile.xls", False

Set objExcel = Excel.Application

objExcel.ActiveWorkbook.SaveAs Filename:= _
"C:dataMyTextFile.txt", FileFormat:=xlText, _
CreateBackup:=False

objExcel.Quit
Set objExcel = Nothing
End Function

View 4 Replies View Related

Modules & VBA :: With Block Not Set Error

Jun 6, 2014

I have the below code that seemed to work until I tried to add the Loop to it. Now, every time it gets to the piece of the loop with the words Cells.Find, I get an error stating "With Block or Variable not set". I don't understand what the problem is. There is no "With Block" and the variable is set. How can I get this to work?

Code:
Function ClearColumns(xlWS As Object, ColumnRangeToClear As String)
xlWS.Range(ColumnRangeToClear).ClearContents
End Function
Public Function SendTQ2XLWbSheet(strTQName As String, strSheetName As String, Col As Integer, strFilePath As String, FirstCellStr As String)

[Code] .....

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved