Results 1 to 5 of 5
  1. #1
    NickWren is offline Advanced Beginner
    Windows XP Access 2013
    Join Date
    Dec 2015
    Location
    Connecticut
    Posts
    70

    Question Basic Access Help and auto popuating fields (New to access)

    Let me start out by saying thank you for reading this post, sorry if any terminology is confusing or not correctly stated, I am new to access and haven't gotten the hang of it, I have no prior experience with any database programs, however I do know how to code C/C++.

    First question I have is: does it matter if I enter new data into a query or table (adding data through a form)? Will it add it to the data set I already have if I do a query?
    - I put the macros as being Open Form -> Form Name: "SampleEntryForm" -> Filter Name: " " -> Where Conditions = "[Facility Name]=[Forms]![FacilityTForm]![Facility Name]" -> Data Mode: "Add" -> Window Mode: "Normal"

    So if it is a new entry take the "Facility Name" from this form and putting it on the next form for "Facility Name" (I have it go to the next form but it doesnt write to the table just leaves it blank) also it should open to a new entry point or the last spot on the table, but instead just opens all the data
    Or if it is an existing entry sort the query by "Facility Name" (this I have)

    Second question: How can I tie fields together?
    I have a table with basic Facility information I want it to take the Facility name and abbreviation we just picked on the FacilityTForm and use it as parameters or drag it to the entry portion to auto fill those two fields.

    I also want the test type to be auto populated, I have an extra table with the Test Type in column one and Test Abbreviation in column two; I want it to auto populate the test abbreviation depending on the test you pick. (sort of the samething as the facility and the facility abbreviations)

    I want to do the above so I can just hide the fields and no one can tamper with the abbreviations which are used for a unique code.
    I dont know if this possible, but I want our numbering system to look like so ( i have it so the numbers continue but we want them to restart at 0 for each new tests from a facility)
    PL-0001-COL
    PL-0002-COL
    PL-0001-MM
    PL-0002-MM
    BB-0001-COL
    BB-0001-MM
    (This isnt as necessary as the rest)


    Third question: Checkboxes will auto populate the date/time checked
    I've been reading up and found some answers but doesnt really help me out, I guess I need a bit better of an explanation. Most dealt with VBA but didnt explain where or how to write the code to extract if it was clicked.



    Last question: making a search form?
    If I can just get how to make several textboxes to search for specific fields such as "ID", "Facility Name", "Test Type", "Search Dates" [Date 1] - [Date 2], "Freezer Location"
    This info is taken off a table called SampleStatusClick image for larger version. 

Name:	samplestatus.jpg 
Views:	13 
Size:	122.1 KB 
ID:	23066

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Data entry/edit can be done through a form that uses table or query as RecordSource. Data will automatically pass through to table in either case. As long as the query is an editable dataset.

    Facility primary key should be saved as foreign key in sample record. If you don't use a form/subform arrangement to synchronize master (facility) with dependents (samples) then will require code to save the key into dependent record. Only the primary key should be saved into the dependent record, not other facility info.

    Text data as primary key is not as efficient as number.

    Generating custom unique identifier is a common topic. Start with https://www.accessforums.net/forms/a...ing-23329.html

    Why would checkboxes be involved for entering data/time?

    Search form, review http://www.allenbrowne.com/ser-62.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    You seem very keen. But your questions are a little random (all over the map).
    Database is founded on some basic concepts. You would do yourself a world of good by reviewing a few tutorials on database design and Normalization. In fact, working through a couple of tutorials from Rogers Access Library see the Examples area for specifics, and this one.
    As for Access, Steve Bishop has an excellent series of videos on youtube.
    Also, there are several youtube videos (of various quality) that deal with Access or specific things with Access
    eg Creating a Table, designing a form....

    Good luck.

  4. #4
    NickWren is offline Advanced Beginner
    Windows XP Access 2013
    Join Date
    Dec 2015
    Location
    Connecticut
    Posts
    70
    I am a little confused about the foreign and primary key, so if I type "Poland" into the table above, I want the "PL" to automatically populate the Facility Abbreviation. Same with Test Type, if I type "NETest" -> "NET" will be typed up in the "Test Abbreviation". I am guessing this is a VBA script that I have to write, but is it just a simple if not statement? I dont really know where to start to have this write in the value into that column.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Explore the power of multi-column combobox. User sees and selects "Poland" but the combobox saves "PL". http://datapigtechnologies.com/flash...combobox3.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-29-2013, 08:35 AM
  2. Replies: 6
    Last Post: 09-22-2013, 09:52 PM
  3. Replies: 1
    Last Post: 03-02-2013, 02:07 PM
  4. Auto populating fields from MS access
    By fawazeto in forum Forms
    Replies: 0
    Last Post: 04-04-2011, 08:25 PM
  5. Access 2000 Auto Populated Fields
    By Cylena in forum Access
    Replies: 1
    Last Post: 05-18-2009, 07:50 AM

Tags for this Thread

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