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. gaffonso

    How do I tell if I'm on a "new" record in a form?

    Er, feeling a little dumb, just answered this for myself. The NewRecord property of the form will return true if the form is currently displaying a new record. The code would look like this: If Me.NewRecord Then ' do some stuff based on having a new record End If - Gary
  2. gaffonso

    How do I tell if I'm on a "new" record in a form?

    I need to implement some default-setting behavior in a form. For various reasons, I can't use standard field defaults or the DefaultValue property of my controls so I'll need to program the solution. What's the best way to tell if the current record on a form is a "new" record...
  3. gaffonso

    Undoing changes on a bound, modal pop-up form

    I've got a modal pop-up form that bound to a table. The cancel button should close the form and ignore any changes. Problem is, changes made to fields on the pop-up form are committed after the user unfocuses on the field being edited. If a user makes a bunch of changes to various fields in...
  4. gaffonso

    How do I: Enter a Percent, Record a Decimal

    I've got a text box that maps back to a decimal field data type in SQL Server (in an Access Project). I'd like to offer the user the ability to type in an integer from 0 - 100 (the percent they desire) and have that be translated into the corresponding decimal value. I can do this with code...
  5. gaffonso

    Programatically Determing Table Name from Trigger

    In my quest to write a "global" audit trigger (one that does not contain any table-specific code), I need to determine the name of the table that fired my trigger programatically. In my audit code, I log the table name being modified. Without a way to determine that name...
  6. gaffonso

    Calling SP from Trigger (preserving INSTEAD)

    I've got a trigger written (thanks Terry) that's logging INSERT, UPDATE, and DELETE activity on my table. I'd like to re-use this trigger code on all my tables so I thought that putting it into a stored procedure and passing table-specific data from the trigger would be the ideal way to do...
  7. gaffonso

    More Trigger Trouble (Not Null)

    I'm trying to implement a simple auditing feature by creating a trigger that writes a LastModifiedID and LastModifiedDate to columns on each table in my database. The LastModifiedID and LastModifiedDate columns are not directly edited by a user, they rely on the triggers to be populated. In a...
  8. gaffonso

    Not NULL happens before a Trigger, right?

    I'm writing a trigger to write audit data to my table, it automatically inserts the LastModifiedID and LastModified date into fields on that table. I've put a Not NULL constraint on the LastModifiedID and LastModified columns. The problem is that a simple insert into the other columns (not the...
  9. gaffonso

    Find All (including user fields) in Outlook 2000

    Ok, I know how to use the Advanced tab to add user-defined fields into my Advanced Search criteria. But the real bummer here is that I just want an easy way to search on *all* fields in a form, including user-defined fields. Is there any way to do this? If not, is there a way to extend the...
  10. gaffonso

    Why can't I use a trigger to generate a non-int PK?

    A big, big thanks to you! - Gary
  11. gaffonso

    Best way to track changes to a record?

    I'm designing a database in which I track changes made to each record. I've currently got a scheme whereby each table has a "LastModifedID" and a "LastModifiedDateTime" column. I intend to populate these with insert and update triggers. Is there a better way to do this? I...
  12. gaffonso

    Why can't I use a trigger to generate a non-int PK?

    I've seen several places now that a trigger cannot be used to generate a non integer Primary Key. I'm good with that but would like to read up on the details behind *why*. A cursory check of Books Online doesn't turn up this limitation. Where is it documented? Is there a discussion I can...
  13. gaffonso

    Opinions on join syntax?

    I would add that ANSI style joins can be faster than "natural" joins (doing joins using only the WHERE clause). Presumably this is because the specialized join statements allow the query processor to do optimization that it otherwise cannot. - Gary
  14. gaffonso

    Trigger for generating Primary Key?

    Thanks for the feedback. Could someone please point me to the documentation describing the limitation of triggers and non integer primary keys? Terry recommended using a stored procedure. This makes perfect sense but it would eliminate the automatic checks when directly modifying the base...
  15. gaffonso

    Trigger for generating Primary Key?

    I've fallen into the habit of assigning Surrogate (artificial) keys when doing my relational designs. I've got a client who needs a database with an "Intelligent" primary key on one of the tables. More specifically he would like the Primary Key to be a "Product Number" that...
  16. gaffonso

    How do I find references to Database Objects?

    I have noticed that reports and forms seem to "do the right thing" when query name changes, but there are plenty of objects that dont. Two that come immediatelly to mind are other queries, and combo boxes that are using queries as Row Sources. A "show dependent objects&quot...
  17. gaffonso

    How do I find references to Database Objects?

    I've got a database that needs some better organization. One of the things I'd like to do is change the query name to be more standardized and descriptive but changing the name is going to break forms, reports, queries, combox boxes, etc. that rely on those queries having their current names...
  18. gaffonso

    Combo Box initial value

    Hi Keith, A quick question, is the ComboBox you are populating bound to a field on the form you are using? I'm a little confused about the problem you are having. - Gary
  19. gaffonso

    Need DateTimePicker for 97 - Suggestions?

    I'm building an application in Access 2000 and have used the DateTimePicker ActiveX control. My client requires delivery in Access 97 format. So far I've managed to workaround all the incompatibilities but the DateTimePicker thing has me stumped. Can I used the DateTimePicker control that...
  20. gaffonso

    Making a combo box open (pop-down) automatically

    I've got a combo box and I'd like it open up (pop-down and show the values as it does when you click on the down arrow) automatically. Is this possible? Thanks! - Gary

Part and Inventory Search

Back
Top