Search results

  1. N

    For loop with dynamic query

    Dear Friends I am trying to make dynamic query. I have a sub saying strSQL1="Select * from qryProduct1" strSQL2="Select * from qryProduct2" strSQL3="Select * from qryProduct3" for t=1 to 3 strSQL0=strSQL & t do something next t But when I run it, it does not know the resulted strSQL0...
  2. N

    Lookup continuous subform

    Dear Friends I have built my form with 4 layer of subforms with my MS Access 2010. Say I have a field, called "text2", in 2nd Subform "subFrm2". In 3rd subform "SubFrm3", I have an field, called "text3" which is also a combo box. My question::: I want to make the drop down of "text3"...
  3. N

    AllowAddition in Subform

    Dear Friends:) I have a subform, the content of which will be manipulated conditionally. If in the main form, the txtUserName and the txtStaff are equal, the content in the subform can be edit, delete and add new record. I used the following code to do this. All works well. but the problem is...
  4. N

    Enable Conditionally

    Dear friends I have a form with a sub-form in my front end database. In the form I have a field which notes the Person who enter the form. Another field I have is Person who is logging in. Question: if the person who created the record is equal to the Person who is logging in, the fields in...
  5. N

    If Statement

    Dear Friends Can somebody help me write a function with VBA for the following if statement. Changes: IIf(([OldCat])="","Start", IIf([OldRegimen]=[NewRegimen],"Same",:) IIf([OldRegimen]<>[NewRegimen] And [OldCat]=[NewCat], "Substitute","Switch"))) Thanks in advance!:)
  6. N

    Copy Unbound Text Box

    Dear Friends I have a form with 4 Unbound Text box. After entering a value in the first Unbound Text box, I want the rest 3 unbound text box to copy the same value from the first unbound text box. Thanks in advanced. Sai:)
  7. N

    Print conditionally

    Dear Friends I am buiding a form to print cheques. In my office, we use 2 currency; USDollar and MMK(Local Currency). Because the size of the 2 cheques are different, I have created 2 reports. In my form, I also have a field for these2 currency. In clicking the Print button, the print...
  8. N

    TransferSpreadsheet with SQL String

    Dear folks In the place of “Table Name” below, I have put the name of one of my sql table. DoCmd.TransferSpreadsheet acExport, , "qF01", "D:\Stock.xls", True, "Form01" I want to know whether I could put the sql string like “Select * from qF01”. Thanks in advance.
  9. N

    TransferSpreadsheet with SQL String

    :)Dear folks In the place of “Table Name” below, I have put the name of one of my sql table. DoCmd.TransferSpreadsheet acExport, , "qF01", "D:\Stock.xls", True, "Form01" I want to know whether I could put the sql string like “Select * from qF01”. Thanks in advance.:)
  10. N

    Code does not work in MS Access 2010

    Dear Friends Can somebody varify the following code for me? It works in MS Access 2003, but not in 2010. It ask me to debug at line Set qryDef = CurrentDb.QueryDefs(strQueryName) Thanks:) Option Compare Database Private Sub Command2_Click() Dim strCrit As String Dim strCritNO As...
  11. N

    When it change

    Dear Friends I have a table with RDate, Person and Rank fields. The table will be sorted by Rdate. Rdate Person Rank 10-Jan A 1 11-Jan B 3 12-Jan A 1 13-Jan A 2 14-Jan B 3 15-Jan C 2 16-Jan B 2 17-Jan C 2 18-Jan A 2 19-Jan B 2 20-Jan B 3 21-Jan A 3 22-Jan C 3 23-Jan C 4 I want to know when...
  12. N

    Look up a value in a table

    Dear Friends I have a table which contains Date and Cost. ADate Cost 1/4/2011 100500 1/27/2011 23000 1/29/2011 50000 2/3/2011 30000 Another Table have Exchange Rates EDate Rate 1/1/2011 700 1/14/2011 780 1/25/2011 760 2/2/2011 740 The cost in the first table is in Local...
  13. N

    Note down if it changes

    Dear friends I want to note down the record if it changes. Supposed I have a patient 101 and his category is as follow in respective date. PatientID Pdate Pcategory 101 1/1/2010 C 101 1/25/2010 C 101 2/10/2010 B 101 2/22/2010 C 101 3/2/2010 C 101 3/5/2010 A I want to retrieve records when...
  14. N

    Different default value in a subform

    Dear Friends Merry Christmas and Happy New Year! I am building a form with subform. I want to set different default value in the subform. The value will depend on a cell value in the form. For example: If the value of "Category" in the form is "1", the default value in the subform would be-...
  15. N

    Gant Chart

    Dear Friends :) I have 2 Dates; Starting Date and Ending Date. I would like to draw a Gant Chart based on these 2 dates. How should I create it? Best Sai
  16. N

    Form Looks up different Query

    Dear Friends I have a form with a subform. A field in the subform looks up a value from a query. When I go to new record in the form, I want to filter the query. But when I am navigating the previous or old records, I want to leave the query unfiltered. Can someone tell me how to do it or...
  17. N

    Look up different Query

    Dear friends I have a form with a subform. In the subform it includes a combo field looking up for a datas. If the form goes to "New Record", I want the combo field look up query(A). If the form is navigating "Previous record", the combo field will look up another query(B). Can someone...
  18. N

    Code for new query

    Dear Friends I am stuck again in the following code. the run-time error code is 3265. I am stucking in "Set qryDef = CurrentDb.QueryDefs(strQueryName)". Can somebody check my error? thanks in advance. Option Compare Database Private Sub Calculate_Click() Dim strLDOMonth As String Dim...
  19. N

    Question Specific Work group file

    Dear Friends This forum help me to create a work group file for security. Regarding the work group file, can i manage my MS Access files to join different specific work-group-files? Thanks in advance. Naung Sai
  20. N

    Query with Current User Criteria

    Dear FriendsI have a file attached with workgroup file.I want to load a Query depand on the user. If the current user is "SKHQAE" or "Manager" I would like to run the query without criteria. else with criteria.Can somebody have a look through it.Thanks in advance.
Back
Top Bottom