Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. scoobey

    Variable Type Issue?

    Hi again! As in my previous thread, I am trying to create a 'template' form, which is automated from the forms record source. Using the code below, I am able to obtain the primary key field name from the recordset for use on some select statements: var_TableSrc = Form.RecordSource...
  2. scoobey

    Getting the Primary Key in VBA

    Thanks guys! I've now got it working - cheers!
  3. scoobey

    Getting the Primary Key in VBA

    Hi there! I'm trying to create a template form which has buttons on it which perform record manipulation, eg Add, Delete, Next Record, Previous Record etc. In order to do this I really need to automate most of the processes when the form loads. The only thing I want to change when I re-use...
  4. scoobey

    Determine the data type of a field - Arghhh!

    Hmm. Think I may have cracked it by using 'LIKE' in the SQL statement. This seems to return all data type sets correctly.
  5. scoobey

    Determine the data type of a field - Arghhh!

    Hi! I am trying to create a 'search form' for querying one of my databases. First off, I have a combo box which selects the fields I need to search on. I then have a second combo box which runs a DISTINCT query on this field. For example, the table is called 'tbl_Desktops' and contains...
  6. scoobey

    Control\tab Index help

    Excellent - works a treat! Thanks chaps!
  7. scoobey

    Control\tab Index help

    Thanks for responding, PH. The only problem is that I don't think the control property can reference the TabIndex value as it returns an error and highlights the "If Me.Controls(i).TabIndex = 0 Then" line: Run-time error '438': Object doesn't support this property or method. Any other...
  8. scoobey

    Control\tab Index help

    Hi! I am pulling my hair out over this one! Basically, I want the first control in my form (or the field that has a tab index of 0) to automatically receive the focus when a user clicks on a button. All fields are disabled by default, but when a user clicks on the 'Edit' button, all the...
  9. scoobey

    Problem referencing me.controls in function

    Thanks guys - managed to fix it in the end. The msgbox ctl was causing the loop to fail (not too sure how that got in there). All sorted now! Cheers!
  10. scoobey

    Problem referencing me.controls in function

    OK, this is my function (I have taken out the rest of the function to make it easier to read): Public Function EditValidation(FrmName As Form) MsgBox "beginning of loop" Dim ctl As Control For Each ctl In FrmName.Controls MsgBox ctl Select Case ctl.ControlType Case acComboBox...
  11. scoobey

    Problem referencing me.controls in function

    Hi! I was given some help on a previous thread to cycle through some controls on a form to enable/disable them, which worked great. However, I now need to move this from the form procedure level to part of a function, but seem to be running into diffuculties. The code is below: Dim ctl As...
  12. scoobey

    Referencing form variables from a function

    Hi All I am trying to reference a glabal form variable from a function, but for some reason it doesn't seem to work. On the form, I have a call to run a validation function as follows: If var_ChangeHasOccurred = True Then Call CheckChanges(Form.Name) The form name should be sent to the...
  13. scoobey

    Form name as a variable in a function - HELP!!!

    I new it was something simple - how annoying! Thanks very much for your help!!
  14. scoobey

    Form name as a variable in a function - HELP!!!

    Hi there! I think I have quite a simple problem here. Basically, i'm trying to return the value of a specific field using the forms!<form name>!<field> object. I have a few forms that have the same fields and I wanted to create a module to validate what is in the field, but I can't seem to...
  15. scoobey

    [b] Undo Form/Record Changes [/b]

    Sorry about that. I initially thought i'd put it into the wrong forum which is why I put it into this one.
  16. scoobey

    Undo form/recordsets

    Hi all I am looking to cancel all record changes on a form, but keep having issues with records still being saved. I have a form which loads a table, with several records in the table. If I make a change to the first record, and then move on to the next record and make a change there (and so...
  17. scoobey

    [b] Undo Form/Record Changes [/b]

    Hi all I am looking to cancel all record changes on a form, but keep having issues with records still being saved. I have a form which loads a table, with several records in the table. If I make a change to the first record, and then move on to the next record and make a change there (and so...
  18. scoobey

    [b] Returning results from functions - HELP!!!!! [/b]

    Thanks very much guys - I knew it was something simple!
  19. scoobey

    [b] Returning results from functions - HELP!!!!! [/b]

    I have a form which executes a function on startup to see if a user exists. My probelm is that I can't return the result from the function back to the calling sub! I can output the result from the function, but it doesn't transfer this value back for evaluation! Please help, i'm sure it's...
  20. scoobey

    Converting an address?

    Cheers - thanks for your help on this one chaps. Much appreciated!

Part and Inventory Search

Back
Top