Search results

  1. N

    subform for new record additon

    Hi, I've a main form in which a listbox is created for the keys of electronic payment cards (e.g. Unique key: 1, 2, 3....). Once the particular key (e.g 2) is selected from the listbox. I expect that a subform is available for adding new transactions for that key (e.g. 2). Since subform can...
  2. N

    combo box with a general list and highlight those from recordset

    I managed to pop a combo box with all qualifications a tutor may have by a recordset. I also need to pop that combo box with the qualifications a particular tutor has. I have no idea on this structure. I would appreciate if you have any idea.
  3. N

    Combo box for recordset record

    I've a list box of tutor and combo box in a form. The combo box is populated the qualifications by using DAO recordset in vba. When I click a list box, I want a particular tutor's qualification is highlighted/marked in that combo box and that selected qualification in the combo box scrolls up...
  4. N

    Dlookup problem

    I built the following code with DLookup but runs into Run-time 2465 Microsoft Access can't find the field '|1' referred to in your expression. vTPCode = DLookup("[TPCode]", "tblTWTTP", "[TRef]=" & iID & " AND [TPCode]=" & iTPCode & " AND Date() BETWEEN #" & [ApptStart] & "# AND #" & [ApptEnd] &...
  5. N

    SQL update from an empty value textbox by vba

    I've textbox in a form which is an option for data entry. I encounter a problem of SQL update from an empty value textbox to the table with VBA. Welcome any suggestions
  6. N

    execute sql with textbox for date

    I've the following SQL and update. sAppt = "UPDATE tblTAppt SET ApptStart=#txtApptStart#, ApptEnd=#txtApptEnd#, Completed=chkCompleted, " & _ " AppointedBy=txtApptedBy, RankCode=fraHSR, JobPosition=txtJobPosition, Dept=sDept, Company=sCompany, " & _ "...
  7. N

    Assign to private variable from a subform

    Hi, I built a main form, a private variable and a subform. If the user clicks to select from subform, I'll assign that private variable declared in main form to the value of the selected item in subform. The work is listed below frmTutor ' this is Main Form Option Compare Database Option...
  8. N

    Checkbox set to null value

    I use VBA to build a form and need it to be refreshed (to clear all controls) once the user click a option of option group in it. I can't make it work to set the checkbox to null when I refresh the form even I set the control to triple state. I've read a lot of posts and white paper and found...
  9. N

    recordset in excel-like form

    Hi, I need to use VBA to build an interface for display the reccordset in excel-like format, it allows a selection of a particular entry in the recordset for editing and its associated one-to-many values display in a subform. I would be grateful if you've any idea/sample for this...
  10. N

    Update from another table

    I want to update "Fellow" field in tblTAvail_FPA from the records in qry_Fellow_unique I built a query update (qryU_fellow) in ACCESS 2016. That's UPDATE tblTAvail_FPA SET (FPA.Fellow = -1) FROM tblTAvail_FPA, qry_Fellow_unique INNER JOIN tblTAvail_FPA, qry_Fellow_unique ON...
  11. N

    SQL to create a boolean column for either column 1 or column 2 is true

    I have a tblTutor(Key: TRef) and tblTAvail(foreign key: TRef) tables. tblTutor: TRef(key), FHKAM_FM(boolean type) FHKCFP(boolean type) tblTAvail: TRef(foreign key), SessionNumber I need to make a SQL to link the tables and list their columns and a boolean column, say "fellow" column (type...
  12. N

    Method tiggered with new event in a subform

    I have a main form and a subform, I wanted to know what method will be triggered when i click new in the subform. I would be grateful for any suggestions. NT100
  13. N

    subform's controls' value to main form

    I have a main form and a subform. I want that a selection in a subform will put the selected record's fields values to the controls in the main form for editing. What can I do for this? Appreciate any suggestions.
  14. N

    pass a SQL to a subform

    Hi, I built a lstTutor in a form and would like to list the selected tutor with its appointment history in sbfApptHistory (subform). I have no idea of creating fields for it with VBA codes and just created a blank subform. tblTutor = tutor's table for peronsal particulars tblTAppt = tutor's...
  15. N

    Records with date nearest today

    Hi, I intend to build a query to get the records with the dates nearest today. Below is the table with a few samples PK E_date 3 1/10/2018 3 4/15/2018 3 7/01/2018 9 3/6/2018 9 5/22/2018 11 11/21/2017 The query output should be 3 7/01/2018 9 5/22/2018 11 11/21/2017...
  16. N

    Count key for a table

    Hi, I've a table containing a number of records with duplicated keys like that shown below TRef TTID 1 11 1 24 1 6 2 9 2 14 3 8 I would like to count each TRef in that table and write them into another table as summaried...
  17. N

    duplication of records with query with multitables

    Hi, I've a query "qryTS_Assigned_PIP1" below to report the tutor-student map. I notice that tblTAssign_PIP is fine for the assignments but I encounter a problem of duplication of the teacher-student assignment with the following query. SELECT tblTAssign_PIP.TRef, tblStudent.SUID...
  18. N

    query with columns calculations

    Hi, I've a query with columns TRef (Primary Key), SQuota, SPSQuota, SessionCnt. I need to build a query to apply the below criteria and then sort them in order of effectiveQuota. if (SPSQuota x SessionCnt) >= SQuota then effectiveQuota = SQuota else effectiveQuota = (SPSQuota x...
  19. N

    Duration in year and month of dates difference

    Hi, I want to build a query in ACCESS to calculate a duration between today and invoice_date. I built it as follows SELECT DATEDIFF(MONTH, Date(), Invoice_Dt) AS [Month DatePart], DATEDIFF(YEAR, Date(), Invoice_Dt) AS [Year DatePart] FROM tblEquipment However, it prompted Month...
  20. N

    Automatic numbers for comparision

    I've 4 tables, tbl1, tbl2, tbl3 and tbl4. fld1 of tbl1, fld2 of tbl2 contain values of primary key of tbl3. They are long integer type. I have written a vba to loop tbl2 within the loop of tbl1 to compare fld1 with fld2. If comparison is equal, a counter is incremented and some field values...
Back
Top Bottom