Add number to field

I need to add a number to my inventory table based on a query. I want to add quantity_received from one table to instock in another table. There will already be a number in the instock field. What sort of query should I use. I already have a query to return the value I want, I just don't know what to add to the query to have it update the instock quantity.


Post your answer or comment

comments powered by Disqus
I have a basic form with one unbound box. I want to type a number into the unbound box and have it automatically add the number to a field in the table. Thanks.

I have a very simple form with just one button. When the user clicks it, it asks the user to locate an Excel file, then it imports that file's contents into a table. (The contents consist of serial numbers.)

Now I want to add a field to the form so that when the import is occurring, it will also add in the field's value to the record.

i.e.
Table design: serial number, country
Form: button to import "serial numbers", text field to enter "country"
Import result: all of the records corresponding to the import will have their "country" fields filled in by whatever is entered in the form's text field.

The "country" value isn't in the Excel file because I get the Excel files from several places, so each import will have its own country which I enter manually.

How do I go about doing this "live" update? Thanks!

I'm helping our local Scouts with a Christmas tree order database and pre-delivery, we need to create labels for each tree. I'm using Access 2003

As the orders come in from customers in any order for location, delivery day and tree size, I need to sort the records with a query which sorts by delivery days, then by Tree size, then by ascending Postal Code (qrySortDeliveryOrder). This is fine and no problem.

However, in order to ease tree sorting prior to delivery, each tree needs a label with a unique number assigned, based upon the sort generated by qrySortDeliveryOrder. I've got a number field [treeID] in my order details table ready to have this number inserted.

So once all the orders are in and no more are to be added, I need to run the sort query and then add an incremental number to each record based on the sort order.

I'm guessing that I'll have to loop through the recordset starting at the first record in the sorted query numbering this as 001 and then go through all of the remaining trees as 002, 003 etc, to the last tree.

I'm a little hazy on this and would welcome some pointers to get me going.

Any ideas please?

Hi,
I just wanted to know if i could add units to a number field, for example write 10 m in a number field
If so, how?

Thanks

Good morning people, I have a exsisting database lets call this "old asset db" I am creating a new database "new asset db" I have exported the data fine but what I want to achive is I have a table in the old database called "assets" with a field called "asset number" which is a number and I want the new database to be able to add 1 to the last number in the table , I know in theory (auto number) does this for you but the numbers that have been exported doesn't start from 1. any help will be a great help.

Here's a quick one for the experts out there.

I have a field (PCLNumber) that contains a number in each record.
I want to change this field so that it fits the format

PCL00000

ie I want to add 'PCL' to each record and the right amount of zeros so that each numerical part is five figures long.

eg The entry 123 in Field PCLNumber would become PCL00123
The entry 12 in Field PCLNumber would become PCL00012 etc

I know this should be easy but I just can't find a specific reference on how to do this and my coding isn't up to much.

thanks very much
Neil

I have a field for SSN. If the SSN has a 0 or 00 as the first numbers it auto deletes those numbers. Is there a way in access that when the record is visible the 0's are relpaced so that the SSN will read the 9 digit. Also i have another fiels EIN with 7 digits an i need for there to be 2 9's in the beginning. I was goingto use vba but when i go to yp it i only get .value

My boss has a table with tons of fields on it, he designed it this way because it was easier to add data to one place, but now the table keeps crashing, does ms 2k have a limit to the number of fields in a table??
Thanks in advance.

It sounds real stupid but im having trouble doing this even tho i could a few months ago, maybe because im using Access 2007 now?

Anyway im trying to add these 3 fields in my table:
"Cash"
"Cheque"
"Card"
in this field: "Money In"
All of the fields are Number, i tried in currency but failed in that too and would prefer it as currency.
The validation rule is playing me up telling me to use parenthesis then rejecting it anyway so im at a loss for ideas now.

Anyone got any comments as to how i do this?

Hey there forum friends, I have a dilemma. I have a table (let’s call it tblAcctNum). It has two fields, AcctNumber and AcctName. On one of my forms, I have a combo box that looks up numbers in the “AcctNumber” field. The main reason for this is many of the “AcctNumber”s are used quite frequently. I also have a dlookup function on my form that displays the “AcctName” field that is matched to the AcctNumber. I am familiar with how to set the “not in list” event procedure to add a new AcctNumber. My dilemma is, I want the “not in list” event to open a pop-up form that will allow me to enter BOTH new fields, then click a save button that will return me back to the original form with the new information added so I may continue. When the pop-up form pops up, I would want it to have the new AcctNumber I entered already filled in, with my focus on the AcctName field. (In other words, when I add a new number to the list, I need a way to put an AcctName with that new number) I really wouldn’t even mind if after adding the new number, it simply popped up and asked me to give it the name. What ever will seem to be the cleanest easiest way for this to work, Thanks in advance!!!

I am appending different types of rows to a table. I want to create a number for each row that starts with one and then consecutively numbers each row after it. The issue is that there are four different types identfied by a field with a 1, 2, 3, or 4 number code and I want the numbering to start over for each type. I am thinking to do four different queries, each appending to the same table and starting the numbering of the rows for that type at 1. I could create four tables and use an autonumber field but there has to be an easier way?

Record 1 is type 2 and the field I want to create would equal 1
Record 2 is type 1 and the field I want to create would equal 1
Record 3 is type 2 and the field I want to create would equal 2
etc.

this sounds easy but I don't find how to do it.

My query returns a list of state abbreviations from a state and territory table. I want to add a calculated field to the query where the first record is 1 and each record thereafter is incremented by 1 until the last record, e.g. 1 AL, 2 AK, 3 AZ, 4 AR.... 50 WY. Is there a way to do this not using VBA? Thanks in advance, Usr_X.

hi,
I have dividing one int field by another and the results varies from 0 to 9999.999999999999

When I add a SUM(newnumber) into a group field in reports I get the error :
This expression is typed incorrectly, or it is too complex to be evaluated.

I think it might have something to do with the large decimal place.

from my query can I convert this number to 9999.99 at most ?
ie, only 2 decimal places..
Access should then beable to add the values,, correct ?


thank you for any help..

HI All

I am currently modifying a db for a user in access and am come accross two road blocks.

1.
I have included an extra (number)field in the db which allows the sorting of the db in the number order. What I want to do now and am finding difficult is: Every time the user adds a new record, the program must find the last record number and add 1 to this number. It must then assign this number to the extra field for the new record.


2. I initially displayed a datasheet view of the table to the user to allow editing and new additions, however because the table was linked to another table, it was causing poblems. I then decided to write a query to display the data. I now need to convert the month numbers to the month names in the query. Please throw me some ideas on how to go about this.

Thanx

Kind Regards

I am trying to assign a value to a field using vb. I have already used an auto number for another field, so i definitely have to write the code for this one. I need to assign a number to a field in increments of 1 and the starting number is on a query. Any ideas? The code i have so far is below.

Dim JRNNEXT As Variant

'Loop through unposted journal entries
Do Until rstJournalEntriesToPost.EOF

' Find the next Journal Entry Number
JRNNEXT = DLookup("JRNNEXT", "qry_JENextNumber")
JRNNEXT = JRNNEXT + 1

rstJournalEntriesToPost.Edit
rstJournalEntriesToPost!JRNENTRY = JRNNEXT
rstJournalEntriesToPost.Update

JRNNEXT = JRNNEXT + 1

rstJournalEntriesToPost.MoveNext
Loop

Hello,
I have a table that has some fields and now i would like to append a table to it, mapping the same field and add in the field of the second table that the first one does not have, and leave the field blank for all data in the first field. may I know how can I possibly do this? thanks a lot!

Being very new to MSAccess, could anyone please help. I have created a database that imports a text file using the TransferText command. Everything works ok except one field is a packed 4 digit serial number and I would like to convert this to a date format field. In MS Excel I can use the DATEVALUE command. ie, if I format the cell to date type and enter the formula =DATEVALUE("02/01/1978")+ d1 - and enter a 4 digit number in cell d1, this will convert the value in the =datevalue cell to a date (this uses "02/01/1978" as a start date and adds the 4 digit number to the =datevalue.

How can I do this in MS Access ? Please supply VBA code if possible or any half decent book, or WWW site that will give the answer.

Hi everyone,

Im trying to modify a database that generates invoices. Im having a problem in adding items coming from an ItemsTable to a SelectedItemsTable. Since the numbers of items are too many, i decided to use a search form that will search the ItemsTable for the Item that the user wants to add. The results of the search are propagated in a listbox.

Now, what I want to happen is when a user selects an Item on the Listbox and click a command button (let's say cmdAddThisItem), I want that Item to be added to the SelectedItemsTable. Im trying to use an Update query and setting the "Update to" field to forms!frmSearchAdd!List1 but its not working and I keep getting 0 fields to update.

Can anyone suggest another way to do this? I'm not very well versed at VBA coding yet that's why Im trying to do it this way.

Thanks everyone.

I need to be able to push a button an add 1 to any number field, I may have 10 buttons, but I need it to show a count in the box and everytime you push the button it goes up one.

I am using this to collect times of a particular event that It will total every month and reset to zero. So ineed to be able to get monthly totals to a report and collect the data and store it so Ican present a by month report and total ytd.

The push button is for ease of use, dates need to be fixed so it is not touched but filled in and increments to next day at midnight.

The database counts calls by date, by category - About 15 categories and need to track through the months and keep the information for the reports so you have a every month displayed and YTD totals by category per month and YTD. User will just push a button to count the call, thus adding one to present number in text box, till the end of month, then rest and new month and zero number calls per category.

Anyone feel like helping would be appreciated

Dennis

Hey,

I have a small question. There is a table that I am trying to use that houses product numbers, the only problem is that those product numbers start with a '0' but the '0' got deleted because the numbers are housed in a number defined field. If I change the table properties to text, is there a way I can add a leading '0' infront of every existing product number?

Thanks,
Viperstingray

Here's what I currently have:

- A table with a number of fields about a course
- A course commence date
- A number of days the course will take field
- No course end date

Is there a way to easy add one field to the other to:
Give end date i.e. do I need to write the code to validate all dates which bring the date over a month e.g. start date 29/sep/2007 and number of days 5.

Does date have the functionality already?

Thanks in advance

-Elfman

I have a table with more than 700,000 records. There are no unique fields or unique combination of fields. I would like to add an AutoNumber field but when I try I get the message:

File sharing lock count exceeded. Increase MaxLocksPerFile registry entry.

If I answer yes I get an error that the new field was not added. Is there any way to add a key foield to an existing database?

I need to work around the number of fields limitation of 255 in Access 2007. I am working with large tables out of necessity. I have a total of 114 fields in my table, but I get an error that I have exceeded the limit. I read that there is an internal counter which is suppose to reset when the database is closed. This isn't happening. Can you advise how to work around this?

Hello,

I have a series of 9 identical tables which are linked as text files to my Access database. The content of these tables is manually pasted each day to the table from an external application which delivers the data in an inconvenient way: duplicate values are not repeated, eg if in the first column is the supplier name it appears once then for all the rest of the lines where the products are from that supplier the supplier name is blank. The second column is the product id and the same thing occurs.

I have written a union query to join all the tables together but the order of the lines is jumbled up which of course renders the data meaningless. I am unable to recreate the original order of the data through sorting so I am trying to add an autoincrement field to the union query. The plan would be that I would then be able to keep each of the tables in exactly its original order.

Can anybody explain to me how to do this?

By the way I also tried to add an auto-increment field to the link specification but I couldn't work out how to do that either - if that is an easier solution then I would be happy to learn how to do it.


Not finding an answer? Try a Google search.