well thanks for your help anyhow. I posted a portion of this in the reports forum to see if there was possibly another option rather than using code, if so, then this would be an inappropriate forum right? The numbers are related in this way, for each sales order number (let's say 1111) there...
...As Integer
Dim Sales As Integer
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim strsql As String
strsql = "SELECT * FROM Sales"
cnn.Open CurrentProject.Connection
rst.Open strsql, cnn
Do While Not rst.EOF
Sales =...
Hey thanks for the quick reply. What I'm wanting is text boxes below it, but here's my problem. I have a field that contains different types of sales. There are 16 different sales types, each with it's own number. Some of those types are two sales added together. For example, an order is placed...
...As Integer
Dim Sales As Integer
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim strsql As String
strsql = "SELECT * FROM Sales"
cnn.Open CurrentProject.Connection
rst.Open strsql, cnn
Do While Not rst.EOF
Sales =...
I have a field on a report that needs to use an IIF statement, I need it to say something like this:
IIF([SalesType]= 1****or 101, or 201****,1,0)
and in another place:
IIF([SalesType]>99****AND <199****,1,9)
So basicially the first IIF statement needs to see if SalesType has either the 1...
I have a form with a text field (text1) that someone types in and an option group that the user has to select. Depending on what option a user selects, I have code that adds to it. Let's say the option value is 1, then code adds 100, and then that value is written to another textbox (text2)...
yep, that worked like charm, what I put was this:
textbox.value = ""
and optiongroup.value = 1
I guess the main problem here, is that if a user made a data entry order, they need to be able to go back and edit the record. If the form was bound, that would be easy enough, they would...
well, I'm kind of at the same place here by using the INSERT, it's getting the data into the table, but the controls hold the same info, and it's not letting me look at the new blank record, if that makes any sense.
For example, user types in "blah blah blah" into the textbox, and...
Well, for a few reasons,
This is an extremely scaled down version, in the real database I have a main form with 8 different tab strip options which house there own forms, whose data is either totally unrelated or slightly unrelated to each other. This could be done just by having multiple...
...Case 2
salesnum = 2
Case 3
salesnum = 3
End Select
' Open the recordset
rst.Open "SELECT * FROM Sales", _
cnn, adOpenKeyset, adLockOptimistic
' Add a new record
rst.AddNew
' Specify the values for the fields
rst!SalesID...
I have a variable, let's say intSale, that I need to be inserted into my Sales table, in the SalesType field. The variable is a number, being passed into the SalesType field which holds a number value... intSale holds the value of an option selected from an option group on a form. Here's the...
hey thanks Steve, and Onyxpurr too (although I haven't tried your solution just yet).
this almost works to a T, and given the information you had, it should have. My OTHER problem is that in this same table I have another field for sales of another type. Any certain order number can have both...
I have an option group on a form that has 16 different selections, and the values are 1-16. They are stored in a field Called Reg in a table named Sales.
What I'm needing to do is extract these values as something meaningful in a report by way of query. I need the query to find a particular...
such a simple solution... Thank you sooooo much! You just allowed me to sleep at night! If I could see ya I'd kiss ya! Or at least give you a handshake! :) No, but seriously thank you. It's working like a charm now, and now I know how to replace those other pesky dlookup's that I've got in...
Hi,
I'm having a bit of a time doing this, so any help is appreciated. What I need my code to do, is look up a value from a table, verify that value against what someone typed in, and then execute the next portion of the code. I can have this take care of by a Dlookup function, but I don't...
Thanks Steve, that was basically the problem, and that solved it. With an extra kudo that I learned a bit more about relationships and joins. woo hoo! thanks :)
Thanks again Tony, I'm one step closer here. I'm missing a huge part of the programming scheme since I know almost absolutely nothing about recordsets. But I'm giving it the old heave hoe.. :)
Now obviously something is wrong here in what I'm doing, I'm writing this code in a regular Access...
Hey thanks Tony,,
Funnily enough I am using Dlookup right now, but in converting Access into an Access project, the Dlookup function has stopped working. I was aware that it would not work in a query, but it seems as though it won't work in the code either. This is what I have used:
If...
First of all, sorry for posting this to two different forums, but I wasn't sure of the best one to post to.
Here's what I'm trying to do, have a SQL statement Insert info into a table, and then verify that info from what someone typed in from a text box. My problem is coming in at "If...
Here's what I'm trying to do, have a SQL statement Insert info into a table, and then verify that info from what someone typed in from a text box. My problem is coming in at "If LocalUser.Password =......" It tells me an object is needed. What's the syntax to type in to pull up this...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.