How can i check a field in the table? I have a field called Suborder in the table orders.On the form I have also a checkbox called ChkSuborder. I want to build a code in the OnClick event of the checkbox.This event should check whether there is a field Suborder = true and if so to give out a...
Thank you for the reply.I understand my question about Noin the list was irrelevant.Mt problem is the following.If you open the subform and try to choose say the fourth product,when closing the form you will get the following message:
"The Microsoft Jet database engine cannot find a record in...
I have the following problem.I have a form and a subform based on a query,and this query does not allow the choice of other products.And it is quite logical, since the parameter is (SELECT Max([orderid]) FROM orders).
Naturally no other product can be chosen. I am wondering can i find a...
Thank you.There must be also some other error in my lines, since i get now "syntax error " in the following"
Public Function Alan()
Dim SQL As String
SQL = "SELECT * INTO orders1 FROM orders WHERE orders1.orderid = DMax("orderid","orders")"
CurrentDb.Execute SQL
End Function
In adition to my question,I guess that i should build a make table query that contains only the last order.
To this end i have tried to build the following function:
Public Function Alan()
Dim SQL As String
SQL = "SELECT * INTO orders1 FROM orders WHERE orders1.orderid = DMax(orderid,orders)"...
I need to copy the tables orders and orderdetails containng only the last order.I am copying them to another database using the formula
DoCmd.CopyObject db.Name, "orders", acTable, "orders"
DoCmd.CopyObject db.Name, "orderdetails", acTable, "orderdetails"
I want to use the criteria (SELECT...
I have the following function that works. Could i rationalize it further,make it more simple or
avoid repetition of the commands?
Option Compare Database
Option Explicit
Public StrSource As String
Public Const strDest = bappath
Public Function CopyBackDepots()
DepotBl
DepotVa
DepotHa
DepotPl...
I have a good IIF Function based on the availablity of a field, which sometimes might be 0 and sometimes there is nothing in it.My function works, if the filed cartons is either 0 or > 0. However, my function does not work if the field cartons is blank, i.e. there is no 0 in it.
How an I improve...
I am creating a new recordset in 2 tables, orders and order details.Obviously i have to open the recordset
for two tables.Shall i open the recordset for the table order details and when shall i open it ?
My function shown below does not create a new recordset in the second table,only in the...
In the part of the code shown below, is it possible for the constant LngCustomer to get the fist number of the customers in the table Customers
for example, if the first customerid = 4000, then to get LngCustId = 4000
Const lngCustomerID = 1
Dim dbs As DAO.Database
Dim rst As...
Can you help me with an update query? I want to update
the query sql in such a way, that the cartons should be
the same as branch0 and quantity as items0 in the folloiwng sql:
Dim sqlOnStock As String
SQLOnStock = " SELECT Products.Productid, roducts.branch0, Products.items0 FROM Products"...
I can send an opened report in a word format by clicking tools-office links-publish it with msword, and i get the report in My Documents.I want to do it by code from the form where i open the report..Can somebody help me ?
I want write an update command in an sql form and not with the help of a query.
My present working code now is :
Dim strSQL As String
strSQL = "UPDATE qryOrderDetails SET Branch0 = Branch0 - cartons "
CurrentDb.Execute strSQL, dbFailOnError
The query qryOrderDetails in an sql form is ...
I tried to build a code for deleting a record in my subform and i get the run time error 3075 missing ,] or item.Could you help me find the error in the folloiwng :
Private Sub cartons_DblClick(Cancel As Integer)
Dim strDelete As String
strDelete = "DELETE [order details].OrderID, [order...
I have a continous form where the first control is orderid.It is based on a query.I want however to add other orders.I can do it, if choose another product from the combo box and write down manually the same order number as the previous ones.Can i do it by a code?
For example the first line in...
After updating my continous form it shows not the last
but the prevuous record.I need a code that requeries
the form and shows the last order available something
like that
me!requery
me.order = last( This is my target,not the code of course)
How can i do it ?
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.