General :: Group By Query And Adding Checkbox Fields To Update A Table

Oct 24, 2014

I have a invoice system I have created in Access and it did used to work perfectly and then maybe an update Who knows stopped the system working.

I have an customer order screen that has customer details and then a subform within the same form this takes a total of items & costs for this order and then it entered it into the customers table from the order_Details table using me.Order_total = Order_Total.

I know this is bad design but I store it because once the order is places I need the total to be static because the invoice has been sent and so if someone changes the order then the total owed doesn't change.

I then have a reconcile form which is on a datasheet form straight from the tab;e so it is editable which has a checkbox that then once ticked copies the total from the Order_Total in the table to the reconciled field in the same table and then I use a report to show who owes me still.

So I have made a Select query from the Orders table & Order_Details table and used a Group by Order number (Which is the link between the 2 tables) this shows correctly but now not editable because of the rules So I am trying to add an editable checkbox on the same form.

I tried to use a dlookup makes all of the boxes either ticked or not. I've been looking at Recordsets but I'm unsure if this is what I need or not really

So really I just need to see if I should be putting the Total from the Subform into the mainform and then entering it into the table (Like previously) using a calculated unbound field and then using the Afterupdate event to insert the data into the table. but for some reason it just wont work.

I can get the OnClick to work but then as soon as i go to the next record for some reason it then resorts to 0.00 but then the table shows correctly which ever record the form is working on.

Or should I be using the new query based idea to create the reconcile form and if this is the best way I just don't now where to start on how to get a multiple table query that I can then add a reconciled checkbox which then copies the Order_Total from the table to the Paymet_Recieved field.

View Replies


ADVERTISEMENT

Query – Group By 2 Like Fields In A Table

Jun 6, 2006

My table looks like this:
Sales(a)||Date(a)||Sales(b)||Date(b)||Sales(c)||Da te(c)
1) 50 05/06 75 06/15 100 08/15
So I want to show all sales with the criteria - Date >05/01 <07/01.
The final query totals will be
Sales||Date
50 05/06
7506/15
So the issue is that there are 38 rows with similar data in each column
I have the table in this format because I also have a form that feeds off this table and it needs to be in this format-but I would also like to run a query/report from this table that summaries sales. I also know that since there is more than 1 date value in the row, this is going to make the query difficult to run (each date is linked to a certain sales total).
I guess what I want to do is transfer the horizontal data to vertical data (with certain criteria)
Please help!!!

View 1 Replies View Related

General :: Update Name Fields From Related Table Along With Auto-number?

Jul 1, 2014

The "PersonalDetails" table is related to the "Application" table using the autonumber from table, "PersonalDetails".

The "PersonalDetails" table has "StudentID" (autonumber), "First Name" and "Last Name" fields.

The "Application" table also has "StudentID", "First Name" and "Last Name" fields.

The "Application" table is related to the "PersonalDetails" table using the "StudentID" field.

How do I make it so that the first and last names on the "Application" table are automatically updated when the StudentID is entered?

View 2 Replies View Related

General :: String Manipulation On A Table - Text Is Gibberish In Group By Query

Jun 22, 2015

While processing string manipulation on a table (140K records, 200-250 MB) the file has corrupted, and I lost all vba Modules, but the data and other DB objects seemed to be in tact.

I now have a query with a text field, when I make a simple join SELECT, the text comes in fine (and, of course, seems fine when presented in table), but when Group by - I get Gibarish: "CARVEDILOL 6.25MG, TABLETS"

Is presented in Group by as: "ç …5"

I have recreated the file, importing queries, including this one, but then recreated it as a totally new query, but get that same results.

File Corruption? anything to do about it?

View 12 Replies View Related

General :: How To Update A Table At Client Site To Change Couple Of Fields

Sep 23, 2013

I need to update a table at a client's site to change a couple of fields, and would like to be able to send them something that they can run on their end to perform an insert query.

I cant update the tables via RDP etc. because the database needs to be in Access '97 format, and they all run access 2003.

I also cannot get them to send me the file for updates since it needs to be online basically 24/7.

Is there any way for this to happen?

View 5 Replies View Related

Adding Fields In A Make Table Query

Oct 4, 2007

If I have a make table query where I want to add in some blank fields, say: Field1: “” , Field2: “”, etc…. is there a way I can make these fields a yes/no type instead of the default text?

I know I can manually go into the table in design view after I run the query, but I was hoping I could do it beforehand. :)

Thanks!

View 1 Replies View Related

Adding Fields In A Table To Create New Field In A Query

Mar 14, 2008

I've got a fields called rev code that contain the following values:

field name: 110 131 250 255 258

field value: 7.49 6 11.25 12.11 78


I'm writing a query that pulls from the first two digits of the rev code and need to round off to the nearest dollar so in my query I'll have a column 11 with a value of 7, a column 13 with a value of 6, then I need to take columns 250 255 and 255 add the values together and round off so I get a column 25 with a value of 101.

How do I do that?

View 14 Replies View Related

Forms :: Update Table With Unbound Checkbox

Oct 17, 2014

How do you update table with unbound checkbox? I'd like to add basic yes/no, true/false on update. Currently I'm using a workaround like this

Code:
If Me.chkInkt = True Then
status = "true"
Else
status = "false"
End If

Which is ok if there's one of these, but sometimes I have more...

View 3 Replies View Related

Checkbox Update Query

May 24, 2005

I have a Mainform with a subform linked to a table.
Within the subform i have a number of individual checkboxes and a field [Year].
One checkbox, [checkboxIssue] i have wanted to link two update queries in order
to update the field[Year] with the contents of a [textboxValue] on the Mainform,
depending on the state of [checkboxIssue].
I have run both queries manually, one after the other and the table was updated perfectly.

The problem is that when i link it to the click_Event of [checkboxIssue]
in the subform i get zero updates.

Linked to the Dirty_Event of the subform i get good results for all except the last ammended
record and zero results if ammending only one record.

I am a relative Newbie and have learned a great deal from this forums expertise.
Can anyone enlighten me to what i think will be my very basic error.

Basic or not i have driven myself mad trying to solve it..:-(

View 3 Replies View Related

Update Table With Option Group Label

Apr 10, 2005

I have a unbound field form that I am using as a survey. For one example I have a question with several different optional answers (1=high, 2=medium, 3=low) How and where should I update my table with the actual answer if a user picks button 1, 2 or 3 to read in my table high, medium or low.

View 4 Replies View Related

General :: Using Checkbox Form From One Table To Populate Another Table

Dec 11, 2013

1. I have a table which lists all of the equipment we use in our company and would like to use it as a template in a form so that users can select a checkmark if the equipment is being used that day. The checked items would then be used to populate another table which records all of the equipment the user has selected. I thought the checkmark method would be best so that the user can scroll through the list of equipment and select multiple pieces for the day. The reason I don't use a multi-value field is so that the user can also enter quantity and hours of equipment used in the same table when they scroll through the list.

2. Once all of the equipment pieces have been checked, I would like the user to be able to click a review button which would navigate to the next form with all of the selections for the day. This new form will have the option to go back to the first form if any corrections need to be made. And also have the option to submit the results.

3. Once the user is finished with their selections, the user can then select Submit which will finalize the recorded equipment table and clear the checkboxes and any inputs from the equipment template table (without modifying anything) so that it can be used for the next day and so forth.

I am using access 2013...

View 3 Replies View Related

Update With Group By Query

Aug 26, 2007

I have been struggling with this for a while now and cant seem to get this update to work.

I have a table that holds a project id, a line ID and then the percent allocation to each service line. I am trying to calculate the percent allocation based on the number of repeat project id's IE: 1 project id appears in the table you get 1 for the percent allocation, 2 you get .5, 3 you get .3333333 and so on.

Here is my current query:

UPDATE
rlnAPOppServLine AS A,
(SELECT rlnAPOppServLine.SAPOMID, 1/Count(rlnAPOppServLine.SAPOMID) AS AutoPercent
FROM rlnAPOppServLine
GROUP BY rlnAPOppServLine.SAPOMID) AS B
SET A.PercentAlloc = [B].[AutoPercent]
WHERE (((A.SAPOMID)=[B].[SAPOMID]));

Thanks

View 4 Replies View Related

Forms :: Adding Fields In A Table And Having Output Fill Fields On A Form

Jan 29, 2014

I have a totalquery that runs fine and give me the sum for both fields I'm looking for but I can't get the outputs to fill the fields on the form. I have tried the Dcount query in the control source but that just returns an error and locks up access.

Code:
SELECT [Tble-wcDelays].Causedby, Sum([Tble-wcDelays].HoursDelay) AS SumOfHoursDelay
FROM [Tble-wcDelays]
GROUP BY [Tble-wcDelays].Causedby, [Tble-wcDelays].LinkingID
HAVING ((([Tble-wcDelays].LinkingID)=[Forms]![Frm-ePlusCent]![cleanID]));

That is the query.

View 14 Replies View Related

Checkbox In Option Group

Oct 4, 2006

Hi,
I need an help on my DB.
I have a form with some comboboxes and checkboxes inside an option group, which is a value of a table.
The table is named TB_ALLEGATI and the field inside this table is named TIPO_CANALE (this also the option group name).

the checkbox inside the option group are named SMS, MMS and VOICE with value as 1, 2 and 3.

I want to save the value checked by the user and store it in the table TB_ALLEGATI, but the problem is that i'm able to save only 1,2 or 3 and not the value name that are SMS, MMS and VOICE.

Have you a suggestion on how to perform this action?
Have you any code example?

Thanks in advance.
Regards.
Antonio.

View 14 Replies View Related

Option Group With Checkbox (values)

Jul 20, 2006

Hi there,

I inserted an option group with 3 checkboxes (Yes, No, Re-open). My problem is that I see the values of these checkboxes (1=yes, 2=no, 3=re-open) in my table. I want to see just text and no number. How's that possible ?

Thanks

stronghold29

View 1 Replies View Related

Queries :: Compare Data In 3 Fields In 1 Table / Group By Largest

Dec 4, 2013

I'm trying to create a query that will compare the data in 3 fields in a record, choose the largest (I also have a criteria to order by if more than 1 field has the same entry and it's the largest of the 3), and then group by that.The fields I will need are as follows:

PRODUCT table:
ProductName
Chemical
ChemicalAbstract
PhysicalState
NFPAHealth
NFPAFlammability
NFPAReactivity

qryQuantityOnHand query (which doesn't link directly to the PRODUCT table, it links through associations with other tables):QOH...I will eventually need information from another table for the final reports, but I don't think it has to be included in this query.

The fields NFPAHealth, NFPAFlammability, and NFPAReactivity each may be 0, 1, 2, 3, or 4...I need to ignore blanks; if 1 of the above fields is blank, they will all be blank.For any record, I need to compare the number in those 3 fields to each other, and choose the largest number and group by that rating.

In other words, if the largest of the 3 numbers is a 3 in the NFPAFlammability field, all those products need to be grouped together.If the same number appears in at least 2 of the fields, the order that determines the grouping is: Flammability, then Health, then Reactivity..Ultimately the report will be grouped as follows:

Flammability
Rating 4
Product 1
Product 2
Product 3

Rating 3
Product 1
Product 2
Product 3

Rating 2
Product 1
Product 2
Product 3

Health
Rating 4
Product 1
Product 2
Product 3

[code]....

and each of the groups will be sub-totalled.I'm stumped at trying to create the query in the first place.The added aggravation here is that we are dealing with 23 stores, each with their own mix of products. I have another table that contains the information about which products are in which store.

View 4 Replies View Related

General :: Use Fields In Query Based Subform To Populate A Table

May 29, 2015

I have a main screen that has a tabbed form in it. Each of those tabs has a sub-form in it that displays information and allows some information to be updated.

In one tab I have a query based sub-form that returns information related to the project. This information cannot be manipulated or changed as it comes out of a company managed database. I would like the analysts to be able to add more granular information to a new table by inputting information in a dropdown field for one of the new table fields, but utilizing two of the existing sub-forms fields as identifiers in the new table.

View 14 Replies View Related

Queries :: Getting A Query On Multiple Checkbox Fields To Work With A Date Range?

Nov 7, 2014

I have developed a database which has required many checkbox fields to enable analysis. It requires to have the facility to input random/variable date ranges for statistical purposes.

I have built a query which obtains the counts of multiple fields using the following parameters in Query Builder in Access 2010. Although this comes up with the correct results for these multiple fields when I try introduce date range the results come up blank for all results.

An example of the parameters used for one of the checkbox fields in Query Builder is as follows:

Field: SumAnger: Sum([Anger]*-1)
Table: Default as only one table
Total: Expression
Show: Checked

This works fine.

My latest parameters for the date range are this:

Field: [cDate]
Table: Default as only one table
Total: WHERE Corrected! Whoops Copy & Paste Typo. Too early AM!
Show: Checked or Unchecked makes no difference
Criteria: Between [From Date:] And [To Date:]

This gives a statement in SQL view of:

SELECT Sum([Anger]*-1) AS SumAnger, Sum([Anxiety]*-1) AS SumAnxiety, Sum([Depression]*-1) AS SumDepression, Sum([Listening]*-1) AS SumListenig, Sum([Psychosis]*-1) AS SumPsychosis, Sum([Stress]*-1) AS SumStress, Sum([Other]*-1) AS SumOther, tblCommsLog.[cDate]
FROM tblCommsLog
WHERE (((tblCommsLog.[cDate]) Between [From Date:] And [To Date:]));

what I need to get this to work in Query Builder or failing that recommend some VBA script/code with embedded SQL to achieve the required report.

View 1 Replies View Related

Queries :: Sum Option Group Fields In Query

Mar 26, 2014

I had to modify how I was storing data on one of my tables. I changed checkboxes to an option group with the values ranging from 1 to 4.I need to count each of these entries for a report which will run them into another formula.I am trying to use the below - obv I'm doing something wrong.

Code:
Police: Sum(IIf([OType],1,0))

And this is the original SQL for my queries if needed:

qry_BLT_RCCounts1

Code:
SELECT Year([tblBlotter].[EntryDate]) AS [Year], Month([tblBlotter].[EntryDate]) AS [Month], Sum(IIf([OType],1,0)) AS Police, Sum(IIf([OType],3,0)) AS Ramp, Sum(IIf([OType],2,0)) AS Terminal, Sum(IIf([OType],4,0)) AS AOA, ([Terminal]+[Ramp]+[AOA]) AS TRATotal, ([Police]+[Terminal]+[Ramp]+[AOA]) AS TotalChecks, Year(DateAdd("m",-1,[tblBlotter].[EntryDate])) AS PrevYear, Month(DateAdd("m",-1,[tblBlotter].[EntryDate])) AS PrevMonth
FROM tblBlotter

[code]....

View 5 Replies View Related

General :: CheckBox On A SubForm Based On Query To Toggle Criteria

Aug 16, 2013

I have a SubForm "assignments" based on a Query, which has criteria to filter dates and also to filter 0 and 1 of the checkbox ...

The question is:

How do I put in that SubForm one or more Checkbox to "enable" and "disable", only the criteria of such query? So, toggle, for example, those jobs that are not completed (Checkbox of the query=0) and those that do ...

View 2 Replies View Related

Beginners Question - Auto Update Fields Based On Fields In Another Table

Nov 26, 2007

I don't have any database experience whatsoever so please go easy.
I'm guessing this kind of this is extremely simple for all of you.

I'm constructing a database of network resources and devices and I'd like to automatically update the values in one field based on the values of a field in another table.

The first table is called "IP" and the fields are called "Address", "IP Type" and "Device".
The second table is called "Devices" and contains the fields "Name", "Description", "Asset Number" and "IP".

Here's an example of the tables: (ignore the "code" tag. i've only used it to align my columns properly)

DEVICES:
NameDescriptionAssetIP
XserveFile Server107203.30.144.75
ProliantXDHCP119203.30.144.15



IP:
AddressIP TypeDevice
203.30.144.75Static
203.30.144.15Static


What I want is for the Device field in the IP table to automatically update it's values based on the values found in the Devices table. In this case, the values that should appear in the Device field in the IP table are "Xserve" and "ProliantX".

I've searched through but haven't found a complete solution, just little pieces which I'm too inexperienced to put together myself.

thank you
-Tim

View 2 Replies View Related

Search Key Error 3709 On 2 Fields In The Table - All Other Fields Allow Update

Aug 21, 2013

I have a copy of the back-end that gets a search key error 3709 on two records. In other words, I can duplicate the problem.

The interesting part is that I can update any other field on both these records and save the record, but when I try to change two specific fields, I get a Search Key Error and have to ESC out to continue (basically UNDO the change). Both fields are text fields with lengths of 7 characters and 255 characters, and both are COMBO Boxes on the form.

I tried to focus on the form think there was an issue in the code. I can definitely TRAP the 3709 error on the ON ERROR event on the form using "if dataerr = 3709", but then I tried something even simplier.

I went directly to the table and to each of the records. Again I can update any other field in the record but these two specific fields. When I try to change either of them and move to another record, you get a Search Key Error 3709.

By going to the table record directly I'm as low level as I can get. There are no validation rules on either field at the database level. If it was truly CORRUPT would it let me update any of the other fields on either of these records? One is an empid (not a primary key but is indexed with duplicates okay and not required), and one is status code (not a primary key but is indexed with duplicates okay and not required) so they're no critical fields, but something is keeping them from CHANGING.

Just tried something else; deleted the INDEXES on both the fields. Now it works! I am completely confused now because it really wasn't a corrupt record, but the indexes are causing the problem. Do I need to update the indexes somehow when the users selects a new empid or status code?

View 6 Replies View Related

Adding Fields In A Table

Feb 6, 2006

I have 2 fields in a table 1. called CommAmtDue and the other called CommAmtPd, When the user inputs a value in the CommAmtPd I want the CommAmtDue - CommAmtPd = CommAmtBal

I want this value to be stored in another field in the same table called CommAmtBal

I can do the formula in a query but how can I get the value to be stored in the field to user for later.


Thanks

View 14 Replies View Related

Adding Fields To A Table

Mar 20, 2008

This is going to sound like a bizarre question, but, here it goes. Is there a way to add more than 255 fields to a table? Or is 255 the cutoff? Also, if you have two table with different information on one client, is there a way to add a client to one table and have it automatically add it to the second? Sorry about all of the wierd questions. Let me know if you know anything.

View 3 Replies View Related

Getting Totals By Adding Other Fields Within A Table

Mar 25, 2008

Hi there

I am completely new to access so if this question seems really simple then i apologise. If this has appeared elsewhere on this forum i apologise again!

Can you tell me if the following is possible

I have a table called AA1 containing the following fields:
(PKey)Refno
StudentNo
PC1
PC2
PC3
PC4
PC5
PC6
Range1a
Range1b

What i would like to do is create another two fields called PC total and Range total whereby i create a formula that will add the totals of the PCs for each student )which will then be entered into the PC total column and the same for the ranges.


I am unable to do it using the query function as i have over 225 diffrerent fields overall so i thought if i could create a totals field i could use these for my queries therefore negating the need to include all the seperate fieids, pc1 pc2 pc3 etc...

the above fields are all in number format.

I have probably not explained myself very well and if you need any more information (im guessing yes) then please let me know.

thanks in advance

Jemma

View 2 Replies View Related

Adding Fields From More Than One Table To A Form

Jan 13, 2005

Probably simple, but I cannot see how I add fields from different tables to a form that has already been designed. I can see how I achieve this when designing from scratch.

Thank you

View 3 Replies View Related







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