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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by mac318

  1. mac318

    Calculation in Access Subform using form field and subform field

    Fae, changing data on any table other than the one attached to the form is best accomplished using recordsets. Open a recordset pointing to the table attached to the subform. Update the related record through the recordset. This is vastly more efficient and easier to accomplish than bouncing...
  2. mac318

    Create a date stamp when record is saved

    Perhaps this will help. Instead of using Autonumber to create unique record numbers, I use the following function: RecordID = Format(Now,"yymmddhhmmss") You can use this function in the form's BeforeUpdate procedure to record the date and time of any changes. You can use the...
  3. mac318

    Navigation buttons - not recognizing end of recordset

    In the Current Form event: Me.Form.DataEntry = False This will prevent a new record from being added until the Add Button is pressed. mac
  4. mac318

    Generate SQL Script

    Ketan, there are others far more proficient than I am in accessing data on a remote site. If you don't get a response to your current request, trying posting again with the header, "Accessing remote database." mac
  5. mac318

    Update table with data from other tabe

    Greg, select SQL view and place Terry's code there just as he typed it. Then look at design view and you can learn how to use the design view to produce complex SQL statements. mac
  6. mac318

    Update table with data from other tabe

    If you have a field to accept the resultant, yes, you should use an update query. I misunderstood you from the beginning. After you select update query, there will be an update to line for each field. Place your original formula: [Products].[Quantity]-[WeeklySales].[Quantity] on the line that...
  7. mac318

    Generate SQL Script

    I believe the answer to your first question is to create an SQL statement and save it by giving it a name (stored procedure). Select Append Query for your second problem. You will be asked if the receiving table is in the current or another database. When you select another database, you will...
  8. mac318

    Not enough disk or memory space

    How large are you trying to make the field size? What type of field are you changing. A text field can only hold so much data, 255 I believe in Access97. You may need a memo if you are attempting to expand a text field beyond its capacity. mac
  9. mac318

    Table opened exclusively by another user

    Somewhere back when, I read that once a table is created with data sharing disabled, it will remain that way, even if, data sharing is set to true later. Future tables created will share data; however, the orginal tables will remain as set upon creation. mac
  10. mac318

    Update table with data from other tabe

    Try this: Qty:[Products].[Quantity]-[WeeklySales].[Quantity] Also be sure that your SQL has both tables joined with the appropriate field. If you get a request for anything, it means that you have mispelled one of the fields. Are you sure that the field is named Quantity in both tables? mac
  11. mac318

    Update table with data from other tabe

    Place your code in the SQL where you would normally place the field name. Access will add "Exp1:" in front of it. "Exp1" will show up as a field on the form's "List Fields." mac
  12. mac318

    Navigation buttons - not recognizing end of recordset

    In the form's properties, set the "Allow Additions" to No. Then create a button which sets "DataEntry" to True when you want to add a new record. This is the easiest way to handle this situation without writing code to manage the recordset. mac
  13. mac318

    Increment numbers for month, restart on new month

    First, to increment the counter. Since you store the counter(WorkOrder#) as a numeric field, your can add one to [WrkOrdr#] = Max([WrkOrdr#]). Use error trapping to tell you when the date changes months: [WrkOrdrDate] + 1 will add a day to the WrkOrdrDate field. This will work well until...
  14. mac318

    EOF won't end loop...need some help with code

    Gus, not only must you always dim(inision) the recordset, it must be dim'd where it will have scope within the subroutine in which you access it. A safe way to make sure that the recordset is available to each subroutine is to dim it under the Option Explicit. If you dim it in a Private...
  15. mac318

    I need to copy ONLY certain fields to the clipboard

    dim x as string, y as string, z as string, xx as string x = [Name] y = [Address] z = [PhoneNumber] xx = x & vbTab & y & vbTab & z Clipboard.SetText xx Goto receiving record and: Press Ctrl-V or select Paste from the menu. SetText copies text onto the Clipboard, replacing whatever text was...

Part and Inventory Search

Back
Top