Search results

  1. K

    Query output in a parameter

    How could i get output of a Query in a VBA variable please?? i'm trying as below but i'm getting error: Dim output As Integer vari = DoCmd.OpenQuery("qryCompare", acViewNormal, acReadOnly) Output of a query is a single MAX value. Thanks.
  2. K

    Object reference not set to an instance of an object

    I've started learning part of XML in VBA and I'm getting the error with a sample code provided in UI Editor for MS Office. It has started after restarting the computer. I'm pasting error first, plus a screenshot and in the end sample XML from UI Editor: Thanks, K Error: See the end of this...
  3. K

    lock checkbox on open form

    Could you mention error message you get?
  4. K

    Previous Values

    Understood, thanks for the article.
  5. K

    File Dialog Box??

    Thanks for the code, but it didn't work. i found out that it is because I'm using 64-bit version of Access and comdlg32.dll doesn't work for it. Thanks for FileDialog tip, I worked on it and it worked well. I didn't know about it, cuz most of you people probably know that I'm still in learning...
  6. K

    Previous Values

    I need to understand the way previous values work in the same pattern as in the attached database. This database is a sample i downloaded over the internet while i was looking for my problem, but I'm unable to understand how below query is working in this database even after spending a full...
  7. K

    File Dialog Box??

    Thanks. I changed the ReturnValue to String and its length is 1, but when ReturnValue is LongLong it returns 8. Why is it so? What does it mean? One interesting this is that 'strFilter' value is just first few characters of the actual string and not the full string, as seen in the attachment...
  8. K

    File Dialog Box??

    What is wrong with the following code please?? I'm trying to run a sample file name dialog box exercise, but on clicking the Open button it always show "Cancel button was pressed", and dialog box never opens!! Pasting code below. Using Access 2010. Thanks...
  9. K

    how to set a data source for a combo box with macro and not with vba

    you've not made your situation clear. As i see in Form2, you've assigned Default Value for this field in properties as '=[TempVars]![tmpUserID]'. If you're assigning ID, then how do you expect actual name in place of ID. another thing is, it happens in case where you refer ID (primary key) with...
  10. K

    how to set a data source for a combo box with macro and not with vba

    You could indeed setup a criteria in web database. You were making a mistake. I've used Query1 for your solution, and check it works now. You were using Query2, I have left it as it is to find your mistake. Could you get it?? Thanks vbaInet, for backing me up and getting the database uploaded...
  11. K

    how to set a data source for a combo box with macro and not with vba

    I'm attaching a small sample 2010 database. like i said, we cannot use SetValue macro in web database, so i've used Requery to do the same thing. Open the form, make a choice and see it it works. Then look at the Query and 'After Update' event of first Combo. Hope it helps, if I understood...
  12. K

    how to set a data source for a combo box with macro and not with vba

    Ok, I've not tried this but SetValue is a Macro function that manipulates with RowSource of Combo Box, but it is not available for web database. Requery is available from Macro's and setting it up on SetFocus event should work.
  13. K

    auto fill

    Thank you. Works now, I was missing the double quote marks in the form name portion of the code. Though I tried 'DoCmd.GoToRecord , , acLast' in my code earlier, but it didn't work... but now it is working. I'm using Access 2010. Sometimes closing and reopening Access solves these kind of...
  14. K

    auto fill

    Thank you. Sorry for late reply. Provided link shows, DoCmd.GoToRecord acDataForm, "Employees", acGoTo, 7 while I'm looking for a correct format of go to last record, i.e. DoCmd.GoToRecord acDataForm,frmClient,acLast, for Access 2010. K
  15. K

    Default Error Messages

    Yes, all is ok. Really thankful for the help I get from you guys )
  16. K

    Default Error Messages

    From your reply it sounds like format IsNull(Me.ID) is right, but something is wrong with the processing. Your first reply sorted my problem. Thanks for that. About Me.ID doesn't exist... well, it exists... and also when i type 'Me.. intellisearch automatically shows 'ID'. It was understood...
  17. K

    auto fill

    Thanks, and what is the correct format for DoCmd.GoToRecord acDataForm, frmClient, acGoTo, 3 DoCmd.GoToRecord acDataForm,frmClient,acLast, I've even tried without ',' after acLast in the last command but could get it work!!
  18. K

    auto fill

    You're right Galaxiom, but it was my first database project and there are design limitations. At the moment, am just looking for workarounds so that I learn more and more. Thank you so much. Got it working, thank you once again ) Just couple of questions please. 1. Like you mentioned the...
  19. K

    Default Error Messages

    Thank you, got it working by using both Me.NewRecord via VBA, and IF [Form].ID IS NULL THEN via Macro. Only I couldn't get it working if i try to check Null value of [Form].ID via VBA. I tried to use same IF and NULL combination as in Macro and IsNull() but VBA compiler gives debug error, and...
  20. K

    auto fill

    How to fill values in a new record with data from previous record please? I've total 11 columns in a table and values in 3 4 columns are repeating for few rows before it needs to be changed eventually. I want to fill these rows with values from previous record. Thanks.
Back
Top Bottom