Search results

  1. A

    Mis-Behaving Combo Box

    It seems that either you based your combo on a table where organizations names are not uniques (not a top-hierarchy lookup table of organizations but some table on the many side of a relationship). In this case, use a top-hierarchy table instead or use a SELECT DISTINCT statement. Or you based...
  2. A

    Wrap results of debug.Print?

    If you are building your SQL under VBA, then it is up to you to put carriage returns in appropriate places (VbCrLf) Ex: strSQL = "SELECT blabla " & VbCrLf & _ "FROM blabla " & VbCrLf & _ "WHERE blabla" & VbCrlf & _ "AND blabla"
  3. A

    I need some help...

    You should have a look to the sample databases that ship with Access. One of them is related to books reservations and has the kind of functionalies you describe (filtering by authors, etc.)
  4. A

    Creating objects at runtime

    Without further details it is not possible to provide more help. Explain the context, data in cause, what exactly you want to do and what you have in hands (form(s)). BTW infinites, as you say, only exist in theory. No chance that you ever run into related pb with Access. And in the meantime...
  5. A

    Rounding off numbers.

    I guess B. Gates would readily reply: 'Wait and upgrade to WXXP and A XXP' :(
  6. A

    Creating objects at runtime

    If you know how to code it for reports, you also know for forms. Code should be the same (create a text box and resize it at runtime by setting its Left and Width properties), only events should differ.
  7. A

    can't KILL files with Hidden and Read-Only attributes

    Declare and use the FOF_SILENT and FOF_NOCONFIRMATION constants as follows: Public Type SHFILEOPSTRUCT hWnd As Long wFunc As Long pFrom As String pTo As String fFlags As Integer fAborted As Boolean hNameMaps As Long sProgress As String End Type Public Const...
  8. A

    Rounding off numbers.

    For WHAT? ;) Earlier versions... You mean Access 1.0 and 2.0? I didn't know that you were a collector. Or is it sentimentalism?:p Anyway, I may consider a donation, just for your own sake (extinction is getting close) and to see if you still lurk around these fora for the next future :D
  9. A

    Round Down to one decimal

    Try: Function RoundN(x, N As Integer) ' ' Rounds a number to N decimal places ' Uses arithmatic rounding ' N should be in the range 0-10 for proper results ' Dim Factor As Long Factor = 10 ^ N RoundN = Int(x * Factor) / Factor End Function
  10. A

    Concatenate text values in a many side of a relationship

    Although possible it is not advisable to try to get this format directly from queries, since concatenating the engine models on the many side of the relationship will involve code that will considerably slow down your query. Try to get that result on a report (make a simple query gathering your...
  11. A

    populating listbox with all available reports

    Populating a listbox through code involves a creating a particular kind of function that is not at all intuitive. I would either try to create a value list instead (make a string of values from the obj.Names you gather and assign it as the source of the combo) or preferably, I would go for a...
  12. A

    Rounding off numbers.

    pcs, I suscribe to your point 100%. As a matter of fact, A2k was widely recognized not being worth the upgrade but eventually for 2(!) features: replications improvements and subdatasheets. Needless to say that one has to be very keen on that to consider upgrading in such conditions... And this...
  13. A

    Updating drop-down list of combobox based on it's own content

    I am still not clear why you do not seem to consider that the Autoexpand property matches your pb? However, the error is because the user has began to input a value when you requery the comobox, then forcing the commitment of that value. One plausible solution would be to save the entered and...
  14. A

    Rounding off numbers.

    Yeah. Luddites are endangered species nowadays :p (But not as much as people calling me heavyweight. Trust my word :D )
  15. A

    can't KILL files with Hidden and Read-Only attributes

    Seems that I have found something better still... The following will remove either individual files or entire directories and is not attributes-sensitive: Public Type SHFILEOPSTRUCT hWnd As Long wFunc As Long pFrom As String pTo As String fFlags As Integer fAborted As...
  16. A

    can't KILL files with Hidden and Read-Only attributes

    This will remove the hidden and archive attributes of a file. Dim fs As Variant, f As Variant Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFile("YourFilePath") f.Attributes = f.Attributes - (f.Attributes And (vbReadOnly + vbArchive)) Set fs = Nothing Set f = Nothing...
  17. A

    Password Protected Form

    What kind of switchboard do you use? The first precaution would seem to be not to let users any opportunity to close the switchboard and open a form by themselves! (modal form with no close box) As to detecting from where a form was opened, you could use the OpenArgs property of your forms...
  18. A

    Rounding off numbers.

    Hi Jerry, NeatCode is an MS free sample database with a variety of code snippets, downloadable from the MS Site.
  19. A

    Rounding off numbers.

    From NeatCode97 Function RoundN(x, N As Integer) ' ' Rounds a number to N decimal places ' Uses arithmatic rounding ' N should be in the range 0-10 for proper results ' Dim Factor As Long Factor = 10 ^ N RoundN = Int(x * Factor + 0.5) / Factor End Function
  20. A

    Major Issues - Pls Help!!!!!!!!!!

    I would say: 1. Get rid of OLE objects in your DB. Eventually save them as files in an organized way so that later on you can link link them back to you DB if you want, by storing their path (only) in a field. 2.Once rid of OLE objects, repair and compact your DB. In serious cases of DB...
Back
Top Bottom