Search results

  1. A

    Primary Keys

    I have a table for a multiple parents linked to a child table. I need to figure out a way to only allow 1 parent to be coded as primary, 1 as secondary, and then the rest as other... I thought about making Primary/Secondary/Other a primary key. But then I can only have 1 other. I would have...
  2. A

    Delete in table from input box

    I'm a beginner at VBA.... I thought it worked, but it doesn't... I want a inputbox value to delete from a table... When I run it, it asks for a parameter value of MyValue1.... DELETE * FROM [TBL-Purchases] WHERE [TBL-Purchases].[Stock_ID] = 'MyValue1' Dim Message, Title, Default...
  3. A

    Delete in table from input box

    'MyValue1', single apostrophe on each side did it! Thank you! FIXED!!! Private Sub Command31_Click() Dim Message, Title, Default, MyValue1, MyValue2 Title = "Sell Stocks" Default = "" MyValue1 = InputBox("Which stock ticker name would you like to sell?") MyValue1 =...
  4. A

    Delete in table from input box

    Thanks for you reply. You are right about the [] on the TBL name, but I tried the extra quotations and it gives an error. I leave the quotations out and it brings another input box to ask for the value of MyValue1...
  5. A

    Delete in table from input box

    I'm having trouble executing a SQL command in VB... I want it to find the the value of the input box in TBL-Purchases and Delete all related values. Here's my code.... I get an error on the line I've highlighted in green... Any thoughts? Private Sub Command31_Click() Dim Message...
  6. A

    Count Distinct

    Thanks so much for your suggestions! Works beautifully!
  7. A

    Count Distinct

    I'm stuck... I have 2 tables linked with a 1 to many relationship by NAME. Tables look like this.... TBL-STORE NAME ADDRESS Walmart 12 Nowhere Target 14 Somewhere Lowes 10 Anywhere Sears 16 Nowhere TBL-PURCHASES NAME [NUMBER OF ITEMS] [PURCHASE DATE]...
Back
Top Bottom