473,386 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Update subform query with barcode

3
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 2273
patjones
931 Expert 512MB
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
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,556 Expert Mod 16PB
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
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 Expert 512MB
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,556 Expert Mod 16PB
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
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...
0
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...
5
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...
1
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...
1
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'...
9
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...
2
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...
1
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...
7
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...
0
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.