Results 1 to 8 of 8

Thread: Creating Forms

  1. #1
    Join Date
    Jul 2007
    Posts
    3

    Smile Unanswered: Creating Forms

    Hi,

    I need to create a form to enter data. I would like to create some sort of shortcut so I don't need to enter the full word every time. For example if I was to use a surname field for my surname (and most common variants), I would like to be able to enter a code and return various values say:

    1 returns Wellbelove
    2 returns Wellbeloved
    3 returns Welbelove
    4 returns Welbeloved

    Also I would still like to be able to enter in free form, so the rarer values will not have a code but can be entered manually.

    Thanks for any help

    Alan

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi Eddie

    Welcome to the forum

    Unless you have another application in mind I would seriously avoid doing this. To do so you will need to store all surnames in a separate table whether used or not. That is a lot of space wasted on useless data. Also, it is an all or nothing for this type of thing - you either enter a code or you enter the value, not a mix and match. Finally, surname is unlikely to have any functional dependencies again negating a good reason for having them in another table.

    You are unlikely to find users save all that much time using autocompleting surnames. If you have something else in mind (like for example if you had a database of cars it makes sense to autocomplete manufacturers as there is a) a reasonably finite number 2) they are likely to repeat quite often 3) there might be further dependencies) then fair enough.

    HTH
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Jul 2007
    Posts
    3
    Thanks for the prompt reply,

    There will only be 6 or seven results for the surname field, but I will need to enter Wellbelove several hundred times, Wellbeloved about 50 and the other 3 or 4 rarely, so I was hopeful of some sort of shortcut.

    Thanks again
    Alan

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Interesting....

    Ok - you could create a table that contains these "common" surnames. Assign that to a combo box. That gives you the autocomplete part. Store the actual surname rather than a code. Don't set Limit To List to true.

    This way your users can shortcut to wellbe... or type in a specific surname.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Jul 2007
    Posts
    3
    Hi,

    I opted to use a simple lookup in excel as the database will not be to big. I am not familiar with access and was hoping to use this data for practice. Can anybody recommend a tutorial/book as I don't always find the ms access help function particularly helpful. Plus it will hopefully somewhat reduce my visits to the forum

    Thanks again
    Alan

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by EddieRiff
    I opted to use a simple lookup in excel as the database will not be to big. I am not familiar with access and was hoping to use this data for practice. Can anybody recommend a tutorial/book as I don't always find the ms access help function particularly helpful. Plus it will hopefully somewhat reduce my visits to the forum
    Totally with you on the help. Don't avoid the forum - you will find you will learn a heck of a lot hanging round and reading other peoples problems & suggested solutions.

    Personally I like this:
    http://www.amazon.com/Access-Develop.../dp/1576103498
    Don't know if there is an XP\ 2003 version.... One thing I really like is it covers database theory & ANSI SQL before getting into Access itself. It even covers stuff not supported by Access. As such you get a bit of grounding in databases generally.

    My $0.02
    Testimonial:
    pootle flump
    ur codings are working excelent.

  7. #7
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    I suppose there is nothing to stop you using the surname as the rowsource for an combobox. that combobox could be bound or unbound.

    You'd need to make sure the rowsource used the distinct predicate..
    eg select distinct surname form mytable order by surname

    if the combobox allows the user to add names you will get the functionality that you require.

    if they do add a new surname, then refresh/requery the combobox so that the data is kept upto date. In fact you would have to do that on any change (addition of a new surname, change of surname (from/to) or a deletion of duplicate surname).

    Personally I think it could be a network killer if you are not too sophisticated in when you refresh the combobox data, you could have a heck of a lot of traffic rebuilding what is essentially such a trivial requirement
    I'd rather be riding on the Tiger 800 or the Norton

  8. #8
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I might use a listbox since a combobox requires them to always type out the first 3-4 characters every time. Either a listbox or perhaps even an option group. It depends on how much realestate space you have though. You could have a button next to the field which pops up a form with a listbox.
    Last edited by pkstormy; 07-10-07 at 11:15.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •