473,386 Members | 1,720 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.

Tough Question about subtable/subform

158 100+
I have a table (tblOne) it has 2 columns and about 25 rows under column1. Basically I have Cars as the Column header and 25 different types of cars for rows, and Qty for the column header2.

Cars///Qty
1/////////15
2/////////16
3/////////17
4/////////100

I need the users to enter the qty into this subtable/subform and then i need to validate what they put in. For instance if they put in 100 i want to ask them did they mean to put in 100 Volvo's. Also i'll need to perform some other basic functions such as adding up the qty etc, but once i get rolling i think i can figure the rest out.

First, Is there a way to do this and how?
Secondly, Is there a way without using .ado or .dao?
Thirdly, If i have to use .ado/.dao what is the code for it. I have no clue how to use these functions.

Thanks much!
Jul 1 '08 #1
3 1374
missinglinq
3,532 Expert 2GB
This will do what you want:

Expand|Select|Wrap|Line Numbers
  1. Private Sub CarQuantity_BeforeUpdate(Cancel As Integer)
  2.  Resp = MsgBox("Did you mean to enter " & Me.CarQuantity & " " & Me.CarMake & "'s ?", vbYesNo)
  3.  If Resp = vbNo Then
  4.    Cancel = True
  5.    Me.CarQuantity.SelStart = 0
  6.    Me.CarQuantity.SelLength = Len(Me.CarQuantity)
  7.  End If
  8. End Sub
  9.  
but I have to tell you, asking the users if they're sure they want to enter what they just entered, each time, will mot endear you to them, especially if they're entering a large number of these at a time. This kind of thing is usually only done if the data entered falls outside of a predetermined value, such as over 100 or less than 10.

Linq ;0)>
Jul 1 '08 #2
NeoPa
32,556 Expert Mod 16PB
Neither DAO nor ADO should be required in your solution :)

Check out Linq's code (and his advice). Both are worth reading.
Jul 2 '08 #3
Jollywg
158 100+
Ok thanks for your replies! I'll give it a try and hopefully all will be well.
Jul 2 '08 #4

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

Similar topics

5
by: Abyss | last post by:
My view. anyone that doesn't like it tough, click off and stop reading it. I have spent the last 45 minutes reading through all the posts, and I believe that you have all missed the mark of...
0
by: Edward | last post by:
westmj@hotmail.com (Michael) wrote in message news:<aff51963.0310132247.1a6f5efd@posting.google.com>... > I just spent two hours trying to work out why my procedure wouldn't > allow me to set the...
15
by: Rey | last post by:
Howdy all. Appreciate your help with several problems I'm having: I'm trying to determine if the Visit subform (subformVisits) has a new record or been changed, i.e. dirty. The form that...
1
by: John Michael | last post by:
I have a form that has a subform that has a subform. The subform loads a record based on a combo lookup box in the main form. I'm trying to set a value in the subform based on a value in a...
4
by: Michael Fay | last post by:
There have been threads in this newsgroup explaining how to tab out of a subform to the parent form -- without having to use ctrl-tab (of which users might be unaware -- and at any rate, they...
1
by: MP | last post by:
I have a main form that has a subform which also has a subform: the main form is the first subform is the second subform is When I click on the button »AddNewSubSubRecord« (add a new record...
6
by: DMUM via AccessMonster.com | last post by:
Hello I am trying to pass the name of my subform to a function/sub but I can't seem to get it to work. I am using an autokey function (ctrl E) to unlock text boxes on a subform. I have a few...
3
by: Shortstuff12345 | last post by:
I have a database where I'm trying to do some root cause analysis on design changes. Each design change could have multiple root causes associated to the change. I'd like to try to setup the data...
5
by: jconstan | last post by:
hey all, i am having a problem with a certain query which pulls records from two tables. one table contains info entered into a main form, and the other has information entered into the subform. ...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.