473,324 Members | 2,417 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,324 software developers and data experts.

More challenges with Returning orders

Hi!

Background info:

I put the essential data from tblOrders, tblCustomers in the head
section on a popup form, and the data from tblOrderDetails in the
Detail section. The form is a continous form.

I made a tblReturningOrders that I use as data for the report of this.

It is all being:

DoCmd.RunSQL "DELETE * FROM tblReturningOrders"
DoCmd.RunSQL "INSERT INTO tblReturningOrders SELECT * FROM
qrySendReturn
"WHERE (((OrderNr) = Forms!frmOrders!OrderNr));"

It works fine.

Thanks to Darryll and Ed for superb help.

At the end of tblReturningOrders I put a 'Select'-field (Yes/No). Now
every time a user choose this checkbox on the form I did:

Private Sub chkReturned_Click()
Me.Refresh
End Sub

and only the selected rows will go to the report, since
tblReturningOrders is the source for the report.

Now to another question:

How can I select all checkboxes on the continous form with a
button?
Setting Me!chkReturned.Value = true
will only select the first one.

Do I need a controltype property to cycle through or..?

I also plan to make a copy of tblOrders and tblOrderDetails, in order
to copy the returned order, so that the IRS, when due time comes, will
greet us.

Is this a good procedure or bad programming?

I have a thousand other question, but I don't think You can bear it
all for the moment, so let me threat you nicely in portions :-)

Me.Name
Nov 13 '05 #1
1 1032
Hi,

Geir Baardsen wrote:
How can I select all checkboxes on the continous form with a
button?
Setting Me!chkReturned.Value = true
will only select the first one.

Do I need a controltype property to cycle through or..?


I'd suggest you use an update-query for that, i.e.:

private sub chkReturned_AfterUpdate()
currentdb.execute _
"UPDATE tblXY " & _
"SET Returned=" & cstr(chkReturned) & " " & _
[Where-clause here]
me.requery
end sub

Basically, the above would require the WHERE-clause corresponding to that
of your continous form (if there is one). Also, you might have to remember
and restore the current record-position before and after issuing the
requery.
Another way would be to loop through all records, but using a query is
definitely the fastest and best approach.

Cheers,
Olaf [MVP]
--
My .02: www.Resources.IntuiDev.com
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Constandinos Mavromoustakis | last post by:
CFP: CLADE 2004-Challenges of Large Applications in Distributed Environments ------------------------------------------------- PhD student - Dept.Informatics at Aristotle University of...
39
by: Antoon Pardon | last post by:
I was wondering how people would feel if the cmp function and the __cmp__ method would be a bit more generalised. The problem now is that the cmp protocol has no way to indicate two objects are...
0
by: gsb58 | last post by:
Hi! In my database (ms access 2000) I have a routine for returning orders. User can check a checkbox in the frmOrderdetails (a subform of frmOrders) next to each orderline, and click a button....
3
by: Mike P | last post by:
Is it possible to return a dataset from a stored procedure, or would you need to write the SQL in your .cs file to return the dataset? Any assistance would be really appreciated. Cheers, ...
3
by: PeterZ | last post by:
G'day, After doing much searching and pinching bits of ideas from here there and everywhere I came up with a fairly 'clean' solution of including a comboBox into a dataGrid column. You can...
11
by: Steven Blair | last post by:
Hi, I am using ODBC namespace and MySQl 4.1 and have hit this problem a number of times and had to do some nasty coding to get round the problem. I am convinced there is a easier way to do...
0
by: gsb58 | last post by:
Hi! When returning an order, I have the following code: strOlinje = "INSERT INTO tblReturn (RetOrdernr,RetDate,RetTime,RetCustID,RetEmployeeID,RetDescription,RetPrinted,...
14
by: RSH | last post by:
I am exploring OOP and I am trying to get a grasp on the basics. Below is the code that creates a basic Person with basic properties. I also have an Orders Class where Orders are made by...
2
by: robert.waters | last post by:
I need to perform the following: - select the most recent X number of records in a table (there is a timestamp field) - select the Nth occurrence of X number of records ex: - most recent 10...
5
by: ryushinyama | last post by:
I am trying to pull up all orders on one page so that it can be printed off in one push of a button. Once it gets to around 250-270 orders the script times out. Here is a map of what it is doing ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.