Search results

  1. Y

    Changing field names

    Jast call the field names Label1, Label2, Label3, Label4 etc.... Then have a table which looks like this Label, Description Label1, something Label2, something Label3, something Then on the form, do something like checkLabel1 = dlookup("description", "labelTable", "label = 'label1'")...
  2. Y

    Searhcing inside a database

    It depends how you want the information and what you want to do with it. If you just want to see it. Do a report. DoCmd.OpenReport "ReportName", acPreview, , "networkSocket = '" & txtnetworkSocket & "'" where txtNetWorkSocket is the textbox You can even have many textboxes and do...
  3. Y

    Which is a better way of coding?

    Thanks, that worked perfectly.
  4. Y

    Which is a better way of coding?

    Thanks Wayne. On a different note, but still talking about declaring variables With the following line Set rst = CurrentDb.OpenRecordset("SELECT * FROM userColours WHERE username = '" & username & "';") What do I declare rst as? I tried Dim rst As recordset But I got an error when doing...
  5. Y

    Which is a better way of coding?

    Is there any difference in doing: (Preferred method) If IsNull(DLookup("username", "usercolours", "username = '" & username & "'")) = False Then OR Dim checkuser As string checkuser = DLookup("username", "usercolours", "username = '" & username & "'") If isnull(checkuser) = False then
  6. Y

    Consequences of not declaring variables

    Thanks Doc. You da man!
  7. Y

    A dynamic table name

    Thank you Wayne and Doc for all of your help. When I type the above, I get a compile error. It highlights the decimal point between the ! and the word Fields and give the message: Expected: Identifier or Bracketed expression Visual Basic simply has a problem with that syntax. This is what I...
  8. Y

    Consequences of not declaring variables

    Im one of the few people who take criticism as a positive thing. Thank you. I am still trying to digest everything you have said, but it makes sense. I do have two questions though: 1/ How do I declare Option Explicit variables? I know how to create them within the sub, but how do I create...
  9. Y

    A dynamic table name

    !.Fields("Division") or !.Fields(Division) Expected: Identifier or Bracketed expression !Fields(Division) "Item not found in this collection" What I am trying to do is the following. I have a table that is year, quarter, division, label1, label2, label3 Now I have unbound textboxes (with...
  10. Y

    A dynamic table name

    I get an error message "Item not found in this collection"
  11. Y

    A dynamic table name

    I have the following code With rst ![year] = year ![Quarter] = Quarter ![Division] = Pert But instead of ![Division], I want it to be dynamic so it reads from what is in a string. ie myString = "Division" With rst ![year] = year ![Quarter] = Quarter ![" &...
  12. Y

    Consequences of not declaring variables

    Yes that does help, thank you
  13. Y

    Consequences of not declaring variables

    What are the consequences of not declaring variables. ie: instead of doing Dim a Dim b Dim c a = .......... b = .......... c = .......... I just jump straight into a = .......... b = .......... c = .......... Am I going to run into problems?
  14. Y

    Question about Visual Basic

    Thank you. I will look into it.
  15. Y

    Enable/Disable buttons (Add, Delete) depending on criteria

    Hehehe, you remind me of what I did before I fully understood Access. I wanted a vehicle report for each day (ie-Vehicles booked out on 1st January), so I created, manually and painstakingly, 365 reports, one for each day. I got up to November 20th, complained to a friend at dinner, who told me...
  16. Y

    Question about Visual Basic

    The visual basic Access uses I think is VBA (Visual Basic for Applications). Can it be used as a stand alone to create things like video games? If so, where is the link to it? I want to start programming video games, and out of C and VB, I have decided to investigate VB first (tell me if this...
  17. Y

    Show all of digits of time

    h Display the hour as a number without leading zeros (0 – 23). Hh Display the hour as a number with leading zeros (00 – 23). N Display the minute as a number without leading zeros (0 – 59). Nn Display the minute as a number with leading zeros (00 – 59). ie: MyTime = Format(now(), "Hh") +...
  18. Y

    Autoletter??

    Yes, it is possible to Automate. Have an objective table that is the following: Objective, ObjectiveLabel Then on the form, have a combobox with the rowsource: select objective FROM objectiveTable; Shrink the text part (white bit) of the combobox to nothing so nobody can type into it, they...
  19. Y

    Extracting Outlook contacts from Access

    Open up outlook. Go to Import/Export Export to a file (next) Ms Access (next) Contacts (next) Type in the new database name or select an exisiting one This will create a table called contacts that will act as the template. Then edit it how you want (dont modify the table layout or structure...
  20. Y

    Delete a record

    Thank you. It worked a charm.
Back
Top Bottom