Search results

  1. Y

    Please Help!!!!

    It sounds like you need visual basic coding that you can run on opening a form, or even by clicking a button. But I am still not understanding. You might have 50 volunteers, and 20 projects...So what happens if their choice 1, 2 and 3 are taken? Do they not get any projects?
  2. Y

    Hi!

    textArtist = "Andrea Bocelli" checkLanguage = dlookup("language", "musicTable", "artist = '" & textArtist & "'") If checkLanguage <> "English" then msgbox "Looks like you'll just have to admire the music" Else msgbox "Wow! What music and great lyrics" End IF
  3. Y

    Best way for sorting text field as numeric?

    Personally, I would create a field called number, and have it hidden in the report. (Can you sort by a hidden field?) Number Name 1.1 1a 1.2 1b 10 10 15 15 111 111 etc.... You can then sort the report by number, and simply make it an invisible field on the report
  4. Y

    Problem with DLookup

    What about: NAddress = DLookup("Address", "tblShareMembers", "Member = '" & TransfereeName & "'") Before I assume syntax error, have you had any problems with Dlookups before? Also, is it a bound or non bound forrm?
  5. Y

    Fields that start highlighted

    I am annoyed by fields that start highlighted. ie: Name Address Postcode etc... And the first field when you enter the form is highlighted. That means pressing any key by accident when you enter the form deletes the value in the first field. Is there any way of ensuring no fields are...
  6. Y

    Date problems

    That worked perfectly. Thank you
  7. Y

    Date problems

    No, this isnt about problems with my romance life. I am having strange date problems. The code is as follows: currpost = DLookup("currpostdate", "currpost") Do While 1 = 1 checkalloc = DLookup("allocationID", "allocation", "nightrent < #" & CDate(currpost) & "# AND status = 'current'")...
  8. Y

    Help with transactions

    I have tried both the search function and google and I cant find anything that isnt overly technical, or helpful. What I want to do is: Begin Transaction do a do b do c End Transaction 'a' might contain coding consisting of while loops or if statements. Is this possible? In other words, I...
  9. Y

    Source for functional db's

    I imagine textbooks bundled with CDs will be a rich source of premade databases ready for real world implications. Also try Microsoft web sites. They often offer free databases (I know they have 5 for those wanting to learn asp.net). If you have already exhausted those, then try making time...
  10. Y

    Importing

    Do you mean: File --> Get External Data --> Import ??? And then select the database you wish, and then choose the forms, tables etc... you wish to import?
  11. Y

    SQL Delete Record - Adds a new record!

    The SQL you have supplied is incorrect. You have simply used a select statement, but replaced select with delete. DoCmd.RunSQL ("DELETE FROM table WHERE field = '" & textbox & "' AND field = '" & textbox & "'") Try that.
  12. Y

    Delete from more than one table pls

    Use visual basic. Have your own delete button, and when you click it, make code for it to delete from all three tables. DoCmd.SetWarnings False DoCmd.RunSQL ("DELETE FROM table1 WHERE xxx = '" & myfield & "'") DoCmd.RunSQL ("DELETE FROM table2 WHERE xxx = '" & myfield & "'") DoCmd.RunCommand...
  13. Y

    Going back to the old value

    That worked perfectly. Thank you
  14. Y

    Going back to the old value

    I want to do the following: If user enters dumb value Then Go back to the old value Else Do some code End If For example... Imagine there is a text field called city and currently has the city name If the user enters something, I want it to revert back to the name of the city that was...
  15. Y

    Testing for a mouse over an object

    I want to do something like If the mouse is over my button then ..... End If I have 5 buttons, when the mouse is over the button, I want to change the text of a label When the mouse is not over any of these buttons, I want the label to be blank. Is this possible? Thank you
  16. Y

    Custom message box for an empty search

    What about the Dlookup command. variable = dlookup("field", "table", "criteria") If isnull(variable) = true then msgbox "Your message" Else Open report End IF
  17. Y

    Export to excel

    Open up access Open an existing file Select your file and select open Exclusive Right click your table and select export Select excel, select your location, and type whatever name you wish
  18. Y

    Tables with common fields

    My assumption was based on clientID being a primary key in the ClientTable. If it were true that one client could have many phone numbers within the database, then clientID would be a foreign key, and there will be another unique field (probably an autonumber). But very good point though.
  19. Y

    Tables with common fields

    I would duplicate the table headings. What you have to remember is that each sales person or customer only has ONE address, or ONE phone number, so putting it in a seperate table makes no sense, and is harder to maintain. Correct relationships and data normalisation is vital for databases, and...
  20. Y

    the autonumber reset solution

    Thats a very good answer Wayne...But you misunderstood what I was asking Can this (compact and repair database) be done from visual basic incidently? Sorry to go off topic a bit and confuse you.
Back
Top Bottom