Search results

  1. C

    How to use iif based on three fields in a query?

    D/Brian Wont believe, even I was dreaming of the code. When I got up the first thing I did was to go over VbaInet code and clearly understood the logical step by step expressions and the places where he has put end select. Now I rcvd yours too and my code is indented but when I copied and...
  2. C

    How to use iif based on three fields in a query?

    D/VbaInet I spent a while to look for that icon 'RESOLVED' but unable to find. I remember seeing that resolved tag in thread tools but now not there. Anyhow noted your instructions and will post here again if needed. Tomorrow if I do not have export operations, will sit down and understand...
  3. C

    How to use iif based on three fields in a query?

    D/VbaInet Sir you have given me the completed code and solution and given me a very good head start. Now I have to check how it is going to affect my month end stock onboard, total of quantities sold and the amounts etc. If cant figure out I have to come running here to post a new thread...
  4. C

    How to use iif based on three fields in a query?

    D/VbaInet I have to thank you profusely. The corrected code by you, I copied and pasted and it seems to be working great. I am sending this to intimate immy to you. I am seeing various permutations to see if it meets all type of sales and issues. I am also going code by code to grasp what...
  5. C

    How to use iif based on three fields in a query?

    D/VbaInet Sir, I ask for your pardon if I have been misleading you. Since it might get more complicated, I earnestly request you to see the below code which has the actual names as it is in my db and pls let me know where it is going wrong. Public Function SaleAmt(ITM_TYPE As Long, S_TYPE As...
  6. C

    How to use iif based on three fields in a query?

    D/Brian Thanks for the input. Feel that case "1" and "2" are required as they are to indicate item-type. I did a blunder by putting different names and words when I posted. Actuals in my db is itm_type field which has 1 to indicate it is store items and 2 to indicate company provided items...
  7. C

    How to use iif based on three fields in a query?

    D/VbaInet Sorry, it might be getting a bit annoying for you. I ask for your forgiveness. I am unable to understand one place is that you have taken into account the sale type in itemB ("2" in my db) but not considered the type of sales in itemA ("1" in my db ). Also I am unable to close the...
  8. C

    How to use iif based on three fields in a query?

    D/VbaInet Sorry. But I missed out to mention. I have put two end select. but get message at case "2" ------ case without select case--------- Doubts: 1. I see total of 3 select case and in that case there should be 3 end select?? 2. In item A, which is case "1" why we are not taking S_TYPE...
  9. C

    How to use iif based on three fields in a query?

    D/VbaInet I sort of changed the fields to what I have and tried it. But getting vb error " case without select case'. Below is the code I changed to fit the actual fields. Public Function SaleAmt(ITM_TYPE As Long, S_TYPE As String, CAT As String, _ AV_PRICE As...
  10. C

    How to use iif based on three fields in a query?

    D/VbaInet So stunned bcos I did not get any notification about ur response. Feeling something must be wrong, I logged into my thread and amazed to find such detailed guidance. As usual I am immy replying to only ack. Will go over it and write the code and get back to u. Sir, you have taken...
  11. C

    How to use iif based on three fields in a query?

    D/VbaInet So pleased for ur response. Item-4 is say for example the products like working clothes and shoes which is under itemB are issued free. If the staff want more than it will be issued at cost price. So if the product under itemB is given as free then the sale amount should be zero so...
  12. C

    How to use iif based on three fields in a query?

    D/ALL I have all but finished a project till this multiple conditions for a sale_amount expression came up. 'saleamt' expression in a query has many conditions based on three fields. For example: 1. field1: two types of products: 'itemA' or 'itemB' 2. field2: two types of sale: 'free'...
  13. C

    How to update a field in main form on double clicking a field in subform??

    D/SIRS May be the field in main form was with a text field etc. So I deleted the fields and freshly entered in the main form using the field_list and now seems to be working. Thread can be considered closed.
  14. C

    How to update a field in main form on double clicking a field in subform??

    D/SIRS I got two tables one with staff names and other with various duties for emergencies. I made a 'job-dtls-table' with fields name-code from staff-table and job-id2. I made a main form with 'job-dtls-tbl' with subform which exhibits 'job-tbl'. I select the name on main form, control...
  15. C

    How to assign jobs from 'staff-tbl' and 'job-tbl'.

    D/Sirs Actually the main hassle is asf: aa) In the products-table there is only one field to see and select. bb) In this job-table I have to see all the columns with duties of all emergencies and then assign the name. cc) So can make a link to job-id and to show all the jobs. dd) Once I am...
  16. C

    How to assign jobs from 'staff-tbl' and 'job-tbl'.

    D/Steve First of all, thanks for the quick response. The way I have made the table is with fields like pk, abandon, fire, gas. Under these are various jobs for each emergencies which will be alloted to staff with all his duties for emergency based on their rank but can be assigned based on...
  17. C

    How to assign jobs from 'staff-tbl' and 'job-tbl'.

    D/Sirs Thanks to overwhelming guidance from this forum, successfully completed staff table with products table, the required queries and reports. Now I have one table with staff details called 'staff-tbl' and another table 'job-tbl'. The jobs are for various emergencies and to designate a...
  18. C

    How to open Form with selected names for editting

    D/David Got down to do as u hv suggested. Feel delicate to ask for basic things. Like in the below code, I have not defined this 'updatedstring' and also '[pkfield]'. UpdSQL = "Update Table Set " & cb_getInfo & "= '" & UpdatedString & "' Where [PKField] In(" & SelectedItems & ")" Would be...
  19. C

    How to open Form with selected names for editting

    D/David I am having difficulty in putting into words what is required. Assume I have a table with staff names and their details in various fields like staff-code, birth-place, passport, and so on. I do have a form to open all the data for a selected person and carry out editing. Now I want...
  20. C

    How to open Form with selected names for editting

    D/David I am trying to make a small db and send. or I will word it better. I got some export cargo formalities and hence did not do immy. Thanks for ur post. In any case I want to use the combo box as u hv suggested. What I am unable to figure out is how I am going to select say five fields...
Top Bottom