473,748 Members | 8,392 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Update subform query with barcode

3 New Member
I program vba in excel but am having quite a few problems with access.I have a query that i type quantites into after i take orders which then calculates prices. i am trying to enter that data by scanning a barcode into a textbox. i was able to do this for a table but how is it done for a query? thanks for the help.
Apr 19 '10 #1
6 2292
patjones
931 Recognized Expert Contributor
So, when you scan a barcode, the value in question is going to a text box on a form and displaying correctly? What kind of data is encoded in the barcode?

Pat
Apr 19 '10 #2
meek7
3 New Member
the item number and its weight or somtimes just the item number. I can handle all the coding as far as the check digit, or differentiating between the types of barcodes, (ive done all this in the past with excel), but i have no clue how to get the info into the query so the price can be calculated. in excel it would be something simple like
Expand|Select|Wrap|Line Numbers
  1. cell(4,"A") = len(barcode,3,4)
but access is apparently a whole different ballgame.
thanks for the help
Apr 20 '10 #3
NeoPa
32,571 Recognized Expert Moderator MVP
Sometimes we ask questions in the hope that the answers will give clues as to what members are not very good at explaining in words. It is very important that the answers are correct and accurate. Unfortunately it seems you have taken no care to reply accurately. This code is not workable (It would fail even to compile). It therefore tells us nothing (except about you).
When posting any code on here please :
  1. Ensure you have Option Explicit set (See Require Variable Declaration).
  2. Try to compile it. If it doesn't compile for any reason please explain that clearly - including the error message and which line of your code it appears on. Compilation is done from the Visual Basic Editor menu - Debug \ Compile Project (Where Project is the actual name of your project).
  3. Copy your code (using the Clipboard - Cut / Copy / Paste) from your project directly into your post. Typing in code is not appreciated as it is likely to introduce typos which cause members to waste their time unnecessarily.
  4. Ensure that the code in your post is enveloped within CODE tags. The hash (#) button in the posting page helps with this. Simply select your code and click on the hash button to have it enveloped automatically.
If all these points are covered then all members will be better able to understand, and therefore attempt to answer, your question.
Apr 20 '10 #4
meek7
3 New Member
Neopa, Maybe should have read my question before jumping to point out that i put in some code that doesent work. Of course it wont work because its referencing a cell. last time I checked there were no cells in access. The code I stuck in was not code that im using, it was merely to give an idea of how i would do it in excel. If anything else is unclear il do my best to explain, but maybe you should read the whole post before you jump to edit next time
Apr 20 '10 #5
patjones
931 Recognized Expert Contributor
Hi -

In your original post you stated that you were "able to do [it] for a table"...and what I was trying to get at in my response is exactly what you do have working in Access, which will allow us to move forward. So, what exactly do you mean in saying that you have it working for a table?

Your wording in relation to the query is confusing me. When you say that you "type quantities into" the query, do you mean that you are entering parameters into a form which then get passed to the query?

I'm not trying to badger you...I just need very clear and specific information about where you're at so that the right advice can be offered.

Pat
Apr 20 '10 #6
NeoPa
32,571 Recognized Expert Moderator MVP
If anything else is unclear il do my best to explain, but maybe you should read the whole post before you jump to edit next time
Perhaps you can explain to us what value is likely to be returned by the len() function in your posted snippet then. I too have done a little coding in Excel, and I've never seen it work (or even compile) with three parameters passed as you posted. It was also clearly not viable code for various other reasons (EG. len() would never occur in working code except in a string or a comment as the IDE would always convert it to Len() - but clearly not to Mid() as is your obvious expectation).

Personally I'd be ashamed to post something I clearly hadn't bothered to check over first, especially when requesting free assistance, but if you feel defending such behaviour aggressively is how you want to play it, then fine. Everyone can read what has been said and I have no cause to feel embarrassed.
Apr 20 '10 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
5185
by: Kunal | last post by:
Hi, I need some help on writing an update query to update "UnitsSold" field in Products Table whenever I save a transaction. The transaction may contain several "Subtransactions", one for each product sold in that transaction. I have a subtransaction table that maintains record of each subtransaction, with data such as: ProductID, Quantity, TransactionID etc. The Products table has fields: ProductID, UnitsSold, UnitsOrdered,...
0
1943
by: Dalan | last post by:
I'm not certain if this is doable in the manner explained below, but I'm certain that there have been Access developers who have done something similar. So whatever insight and assistance that can be provided will be much appreciated. There is a separate Update Query (well several) that consolidate various goods from separate tables for access and selection on a sales/order invoice form. The data which is available is the TagNo,...
5
4700
by: Andrew | last post by:
I've got a list box that selects a record on a subform, and in that subform are a few text fiels and a button that runs an update query. How do I have the update query button run and only update the record that is selected in the list box? The data updates right, but I can't get the update query to do anything but update all of the records. Thanks, Andrew
1
1488
by: Joe.Mobley | last post by:
All, When you sell a product we require access to remove that information from the stock table, so the product is sold througha comobo box named "Combo4" under the prodcuts sold form which is a sub-form of the form Appointments. When creating the update query I used the -1 to redcue the number of avaliable items in stock, but Access prompts for the name of the item you wish to remove, so how do you tell Access to get this
1
2937
by: Earl Anderson | last post by:
Using WinXP & AccessXP, I'd like to automatically have the records that I've just printed in a report automatically updated to have the 'print date & time' immediately inserted into a 'Date/Time' field in the table of all of the 'just printed' records. The crude way would be to run an Update Query immediately before or immediately after printing on those records in the report, but how would I have this done automatically when hitting the...
9
1714
by: DP | last post by:
hi., i've got 3 tables, customer, film and filmrental. i've got a customer form, with a sub form at the bottom, which is a film rental subform. i've created an update query, which when a filmid, is entered into the subform, the 'available' check box in the film table, becomes false (Unchecked). according to which filmID it is. heres the code, i;ve got in an
2
1758
by: Ron | last post by:
Hi All, Okay, I've got a frmOrders with a subform of sfrmDetails. A frmClient has all the client info, plus a subform of sfrmDefaults that has the client's normal ordering defaults (like set products they always order, just no quantity). The frmClient form has a button for adding or modifying orders by popping up the frmOrders (with it's subform) and everything works well so far. I can manually input the orders, with details, etc. ...
1
3237
by: vaiism | last post by:
I have attempted using both Updata and Append Queries to solve this problem, and I can't seem to get it to work. I have three forms that each have an ID#, and a subform with related scores to questions. In the subform I have a textbox that sums the scores, and a field that stores the date the scores were obtained. What I want to do is to store the ID#, the date and the score summation from each of the three forms into a table. This...
7
12508
by: DeZZar | last post by:
Hi all, Unfortunately I am quite a novice with Access!! I've created a number of data bases for my work however becuase my skills are limited to really built in functionality and wizards my programs are not really user friendly. I have searched and searched and tried numerous times to get the following right to no avail - and I think its really becuase of my lack of understanding.
0
1919
by: gobblegob | last post by:
Hello All, I am getting an error trying to update datagridview1 , what i am trying to do is search for an item (BarCode.text) and then display the results to datagridview1 but i just cannot manage to do it , please help me i have been trying for days :( here is what i have this code is extremely crappy as i have read lots of tutorials and searches.... Imports System.Data.OleDb Public Class ServiceCompletedForm Dim connStr As...
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8243
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.