Search results

  1. R

    Clear Error from textbox

    Thanks for the responses. Unfortunately, I tried putting the code in the control source of the form and it did not make any difference. I tried putting the code in the OnCurrent event of the form and it replaced all the boxes with the attachment for the first record only (this is a continuous...
  2. 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...
  3. R

    subform on current firing thrice

    Thanks for the response. The event enters the loop when appropriate, and works just fine. It is just that as a result of it firing 3 times, my screen flickers 3 times - that is just annoying, no other problems.
  4. 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...
  5. 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...
  6. R

    ReplaceWhereClause error

    Thank you both for the solutions. Sorted! Rudra
  7. R

    ReplaceWhereClause error

    Thanks for the response. The line continuation character does not exist in the actual code. I only put it in here to make the code more readable. As it stands, the code is exactly as you have amended it. I still get the same error. Any other ideas? Rudra
  8. 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...
  9. 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...
  10. 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...
  11. R

    Declaring global variables

    thanks, worked a treat
  12. 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...
  13. R

    insert into statement

    Thanks, I needed to set one of the other fields from required to not required. Sorted.
  14. R

    insert into statement

    Sorry, ignore last message - all I had to do was add a space before and after the & and the error disappeared. However, when I run the procedure, I assume that there will be a new record at the end of my table - no such record has appeared. Can you say why? Many thanks, Rudra
  15. R

    insert into statement

    Thanks for the reply. However, when I use the " the compiler says 'Expected end of statement'. Private Sub Insert_Record_Before_Click() Dim lngmRecno As Long lngmRecno = Me.Recno CurrentDb.Execute "insert into tblMain_Table (Recno) Values("&lngmRecno&")" End Sub Any ideas? Rudra
  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

    Thanks a million, worked a treat. This is me shaking you by the hand. Rudra
  20. 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