Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 33
  1. #16
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I added a Lookup ComboBox to your form.

  2. #17
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    OK. got the invoice number combo box. next i need to get the carrierid and carriername to populate from the main form based on invoicenumber. i don't want them as combo boxes. that would imply users have to select. i want it to autopoplate based on the invoice number. then i need the remainder of the subform to autopopulate. do i need to base the subform off a query to get all the fields i want? thanks

  3. #18
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Right now your form is displaying a record from the RecordSource table. I'm not sure what you mean.

  4. #19
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    i want the carrierid and carriername to populate based on the invoice number. i have one record in the table. when i select the invoice number i have the code in the afterupdate event with the following: Me.TXT_CARRIERID = Me.TXT_INVOICENUMBER.Column(2) And Me.TXT_CARRIERNUMBER = Me.TXT_CARRIERID.Column(2). I am certain my code in the vba event is incorrect but i don't know how to populate multiple fields with the previous record!

  5. #20
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The RecordSource for that form has 2 records in it and those fields already have data in them.

  6. #21
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    yes for the invoice table. i want to populate the shipment table with the cooresponding invoice data. the subform recordsource is the shipment table begining with the carrierid and carriername. sorry for the confusion. thanks

  7. #22
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    There was no SubForm in the db you posted. BTW, you are using an mdb but you are showing that you use ac2007. Why the mdb rather than accdb?

  8. #23
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    sorry. i don't know. i am using 2003. see attached. the subform is on the shipment tab. thanks

  9. #24
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    all, by day; i am working on this database in access 2003. I couldn't get the database that contains tabs and subforms. ironically; i took the database home to work on it. i have access 2007. strange enough mostly everything i was trying to do fell into place! the problem is that i was trying to get my fields to autopopulate fields based on previous records. that's still a problem. also; the one field i was able to get to autopopulate; no longer works now that i am using 2007! can anyone explain this to me. i know 2007 is not backwards capatiable so i've been told but you can open a 2003 database in 2007. i ve attached a sample of my database for review. i need help please at least point me in the right direction. i have a deadline and i am spending too much time trying to figure things out. please help thanks

  10. #25
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I've been working on it but some things just take time; especially with my feeble mind.

  11. #26
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    didn't know Thought i lost ya. I'll be more patient and have faith that i get through this to meet my deadline. Thanks so much!

  12. #27
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Jen,
    You do not have the PrimaryKey of one table as the PrimaryKey of another table. You need to set up your relationships better. Try to do it with AutoNumbers and the PrimaryKey of each table and LongIntegers and the ForeignKey in the other tables.

  13. #28
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    the txt_invoicenumber is primary key in invoice table and foreign in the shipment table. i.e. i have bothe txt_invoicenumber in both tables and setup a relationship between the two. Is this not correct. So, i should use a autonumber for all like invoiceid and trackingid and build 1:many relationship? I don't mind learning. Please give me an example.
    Thank you

  14. #29
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The Shipment and the Accounting tables have the *same* PrimaryKey. Not a good idea.

  15. #30
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    Oops! I didn't see this. I will correct. So are the primary keys, the foriegn keys and relationships correct between the invoice and shipment tables?
    Thanks

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Autopopulating Forms
    By daniel.e.john in forum Access
    Replies: 3
    Last Post: 09-09-2011, 07:19 PM
  2. Replies: 7
    Last Post: 07-15-2011, 01:58 PM
  3. Replies: 1
    Last Post: 03-15-2011, 03:53 PM
  4. Write Code to Navigate from Subform to Subform
    By Swilliams987 in forum Programming
    Replies: 22
    Last Post: 02-04-2011, 11:30 AM
  5. Replies: 15
    Last Post: 11-09-2010, 04:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums