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 SkipVought 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. gkrogers

    VBA function in SQL query

    Thanks Terry. gkrogers
  2. gkrogers

    VBA function in SQL query

    Hi guys (/girls/etc), A friend asked me this question last night and I'm just looking for confirmation of the answer I gave him... He's porting an Access app's front-end to ASP. The database is staying in Access, and he knows he's got to rewrite the forms and reports in ASP/HTML, but he...
  3. gkrogers

    RTF from excel into Rich text box

    No, that's right (at least it works fine for me here). In that case I can only guess that the formatting is being stripped out when you write it to or read it from the database. What happens if you try pasting it into Word, using Ctrl-V? gkrogers
  4. gkrogers

    RTF from excel into Rich text box

    You're using something like "RichTextBox1.TextRTF = Clipboard.GetText(vbCFRTF)" right, rather than "RichTextBox1.TextRTF = Clipboard.GetText(vbCFText)" ...? gkrogers
  5. gkrogers

    How to make a combo or list boxes showing two colunms?

    Corrections: i) it's not "NewItem", it's "NewIndex"; ii) it's not "SelectedItem", it's "ListIndex". Although, note that while this will always work with a combobox, it will only work correctly with a single-select listbox (i.e. the MultiSelect property...
  6. gkrogers

    How to make a combo or list boxes showing two colunms?

    The conventional way to handle a description/id pair is to display the descriptions ("banana", "orange", etc), and to store the IDs in the control's ItemData array, like so: Combo1.AddItem "orange" Combo1.ItemData(Combo1.NewItem) = 1 Then you can retrieve the id...
  7. gkrogers

    Why does .Visible say False when it's True?

    You are indeed correct Mr Strong - I should have known better than to think that I could catch you making a sloppily worded post... :) I did create a test project to check my assertion before I posted it, but I obviously managed to build a bug into it(which is quite remarkable, given the...
  8. gkrogers

    SetFocus & Validate event

    I think that using the SetFocus command bypasses the Validate event. i.e. it doesn't fire when focus is changed explicitly with a SetFocus command, only when the user changes the focus with the mouse or the Tab key. gkrogers
  9. gkrogers

    Why does .Visible say False when it's True?

    ...and not just the built-in ones, either - referring to any of a form's properties or methods, built-in or otherwise, will implicitly load the form. gkrogers
  10. gkrogers

    Single/Double conversion

    Thanks guys. gkrogers
  11. gkrogers

    Single/Double conversion

    Incidentally, this problem can be demonstrated in a much simpler way by typing "Debug.Print CDbl(CSng(1.5384))" in the Immediate window - you get 1.53840005397797. Regards, gkrogers
  12. gkrogers

    Single/Double conversion

    I've come across this anomaly and wondered if anybody could shed some light on it for me. I've fixed the problem by using a Single instead of a Double, but am curious as to why the problem arises in the first place. * I'm using a SQL Server database containing a table with a field that stores...
  13. gkrogers

    DateTime Picker

    I don't think you can Steve - a few months ago I developed some data-entry custom controls that would change colour if the value entered was invalid in some way (e.g. out of range). One of them used a DateTimePicker and I remember that I had to leave it so the user had to drop down the calendar...
  14. gkrogers

    Textbox check problem...

    Sounds like a job for a Dictionary object... gkrogers
  15. gkrogers

    Record Locking

    Yes, good point - you'd have to lock the record on the read and not release it until you've done the write. gkrogers
  16. gkrogers

    Record Locking

    I can think of another way, although I'm in agreement with scorpio66 on this in that your best bet is to use the database's inbuilt locking mechanisms. But, if that's just not an option...how about, when you come to write the data back to the table, checking that the data hasn't been modified...
  17. gkrogers

    Need help

    Ah, that'll be the problem - Rnd2 will never return 'high'. Why not write a TestRnd2 function which does, say, 1,000,000 calls and checks the distribution of the results. Some other observations: * You haven't used Option Explicit - it's a complete no-brainer to use Option Explicit in every...
  18. gkrogers

    Need help

    Ooh! A better random number generator...? Any chance of you posting the sorce code...? gkrogers
  19. gkrogers

    Need help

    Oh, and you might also want to consider replacing the 'Do Until i = 8...Loop' with a 'For i = 1 to 8...Next i'. gkrogers
  20. gkrogers

    Need help

    My guess is that the reason it's not responding is because it's in an infinite loop. Try putting a &quot;Debug.Print slots(card)&quot; between the 'begin...GoTo begin' <shudders>. I presume Rnd2 is your own function, and is supposed to return a random number between (in this case) 1 and 8. If...

Part and Inventory Search

Back
Top