Search results

  1. R

    Trouble with DSum using date criteria

    Dear All, I have a query which includes a deposit field and a Transaction_Date field. I would like a cumulative deposit on each record (arranged according to date). The following is the expression I am using: =DSum("[Deposit]","[myQuery]","[Transaction_Date]<=#" & [Transaction_Date] &"#") I am...
  2. R

    Setting sub-report source object to a report in a collection

    Hello, I am trying to join a number of reports into one report. I have a generic report which displays a different dataset given the user's choice on a form. I created a collection where I can store multiple instances of this report (called mcolReportInstances) - this works just fine. I was...
  3. R

    passing open args to a new form class

    Hello, I have a form to which I pass some OpenArgs and WhereCondition when I open it from another form. I am now trying to use multiple instances of the form. The code I am using is given below: Private mcolFormInstances As New Collection Function OpenFormInstance(FormName As String...
  4. R

    Find and validate last modified record

    Hello, I am trying to get an event to fire when I move to a new record. I would like this event to check the data validity/integrity of the record I have moved away from. I can do this by the OnCurrent event, but how do I locate the record that I have moved away from/modified? I am aware of...
  5. R

    How to pass Filter and OpenArgs to subform

    Hello, I have a form called frmBank to which I need to pass a Filter and OpenArgs. This works fine. I now have designed a parent form (frmData) where frmBank is a subform. How do I pass the OpenArgs from my parent form (frmData) to the subform? I find that the subform Open event fires before...
  6. R

    Force consecutive selection in muti-select list box

    Hello, I have a multi-select list box in one of my forms. I want to make sure the user selects consecutive items instead of non-consecutive items (e.g. 1-5 instead of 1, 4, 5). Essentially, for this list box, I would like the 'Shift' button to remain pressed (if you see what I mean). Is there...
  7. R

    Union Query Form

    Hello, I have a continuous form for which I have just changed the data source to be a UNION query. Previously, the control source for the form was one of my databases - now the control source should be the database from which the particular record was derived. Unfortunately, I find that I am...
  8. R

    Passing variable from form to module

    Hello, I have a form with a combo box (cboType_Selector). I need to pass the value of this box into another module to run a program to select the records specified in the combo box. The program runs fine if I keep both subs in the same module but I would like to keep them in separate modules...
  9. R

    Clear Error from textbox

    Hello, I have a continuous form. On that form is an unbound text box which gets its value from another table based on a value in the current record. I use the Dlookup function for this. Now, if there is no matching value in the look-up table, then the textbox shows #Error (which is fine). I...
  10. R

    subform on current firing thrice

    Hello, I have a continuous form based on a table (tblRKM_Halifax_CA_2010) and a subform (subfrmAppend) based on the same table. The linked fields are Recno - therefore, the subform displays and allows edits on the record that is clicked on the continuous form. All is working well, but I have...
  11. R

    Linking subforms

    Hello, I have two forms, both based on the same database. Form1 is in single form view, Form2 is in datasheet view. I am trying to combine the two forms. I have created a blank form and added the two forms as subform controls. Now I need to make sure that when I click on a record in the...
  12. R

    ReplaceWhereClause error

    Hello, I am trying to cascade two combo boxes on the same form. The first box (cboType) is derived from a table, the rowsource being: SELECT tblTypes.Type_ID, tblTypes.Type FROM tblTypes; The second box (cboSubtype) is derived from a table, the rowsource being: SELECT tblSubtypes.SubType_ID...
  13. R

    query one table with criterion from another table

    Hello, I have a table (tblMain_Table) where each record has a field called 'Type' and 'Deposit' and 'Withdrawal'. The 'Type' field has a Lookup criterion and gets its values from another table called 'tblType_Lookup' where the values are stored under the field heading of 'Type Name'. I want to...
  14. R

    gotorecord misbehaving

    Hello, I have a VBA command that inputs a value into my table (Main_Table) on opening a form. The form is bound to the table. I want the form to go to the last record (i.e. the record number that has just been input). I don't know why it keeps taking me to the record just above it. If I ask...
  15. R

    Declaring global variables

    Hello, I have declared a global variable in the procedure of one of my forms and wish to recall the same variable in when a different form opens. I don't know why it tells me 'variable not declared'. What is the error? Can anyone help? Option Compare Database Option Explicit 'declaring the...
  16. R

    insert into statement

    Hello, I am very new to VBA, so please excuse the incompetence. I am using the on-click property of a form object to store a field value of the current record and then insert it into a new record on my table. The syntax I have typed is: Private Sub Insert_Record_Before_Click() Dim lngmRecno As...
  17. R

    Loop in access 2010 macro

    Hello, I am trying to create a macro to loop through all the records in a form and replace a number field until it hits a record with a specific entry. I am unable to find the command in the macro drop-down box. The command I am looking for is Do Until. I would prefer to work through macros...
  18. R

    Insert a record above existing record

    Hello, I have a table which has an 'Autonumber' field called 'Recno'. The table is sorted according to this field and I need to maintain this order for the calculated fields in a related form to work. I have discovered that I have missed adding a record when entering the data and would need to...
  19. R

    Text box to search record

    Hello everybody, I am very new to Access 2010. I have a form for a table. The table has a Primary Key (autonumber). The displays on record from the table along with a calculated field. I have 2 questions: 1. I have an unbound text box. I want to type in a number in that text box and want the...
Back
Top Bottom