Ask Your Question
0

Convert data entry field to predictive lookup [closed]

asked 2014-03-26 19:12:34 +0100

Slow Motion gravatar image

updated 2015-08-27 20:53:12 +0100

Alex Kemp gravatar image

Hi I've made my data fields and entered data into the table. I would now like the fields to do predictive lookup of a previously entered name so I don't have to type it in all the time in full. How do I do this? The fields are primarily all text fields. This is in Base

Thanks

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-02-20 16:04:38.548574

Comments

Okay so I've tried a different approach as I'm quite a newb at this. I took individual columns of data and made them into separate tables. Now I want to create an input form that when I start typing in a field will look up any records in the related table to resolve the entry. Form>Name Field>query Table 'Names'= Bob Smith. If this makes any sense. Thanks for any help

Slow Motion gravatar imageSlow Motion ( 2014-03-28 18:00:48 +0100 )edit

3 Answers

Sort by » oldest newest most voted
0

answered 2014-03-27 19:21:58 +0100

w_whalley gravatar image

If you are using the embedded HSQLDB then what I've done in a case like that is use a select statement like:

SELECT LNAME FROM NAMES WHERE LNAME LIKE CONCAT(:LNAME,'%')

The concat statement prompts for a string and uses it to construct a wildcard so you can enter the first few characters of the last name and retrieve either the record or a short list of matching records.

edit flag offensive delete link more
0

answered 2014-03-27 16:30:54 +0100

mahfiaz gravatar image

You could enable autocomplete under settings or set cells to be validated by the very same set of cells (but not to display error message so you can still enter new values).

edit flag offensive delete link more

Comments

Hi @mahfiaz, I think she/he is asking about base not calc.

m.a.riosv gravatar imagem.a.riosv ( 2014-03-27 19:11:36 +0100 )edit

@mariosv - I think you are right, I somehow missed the hints, probably because I have never found a use for Base.

mahfiaz gravatar imagemahfiaz ( 2014-03-27 23:24:52 +0100 )edit
0

answered 2014-04-01 02:01:43 +0100

frofa gravatar image

updated 2014-04-01 02:54:18 +0100

Slow Motion:

I would now like the fields to do predictive lookup of a previously entered name so I don't have to type it in all the time in full.

I would suggest you use a COMBO BOX or maybe a LIST BOX in your FORM to do what you need. Both tools allow 'predictive lookup' (i.e. typing the first few letters to get to the desired item or region of your list).

There are important functional differences between these two tools however, so you should study the tutorials first to see which one is appropriate for you. Generally, selection from a COMBO BOX writes the value of the selected item into the appropriate field of your table, while selection from a LIST BOX writes the selected item's associated ID value as a foreign key to appropriate field of your table.

Both types of boxes require a DATA SOURCE such as a table or an SQL query to 'populate' the visible drop-down list - see HERE.

Here's a short video showing how to add a COMBO BOX to a Base form. Here's a short general Base Tutorial showing how to create a COMBO BOX.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2014-03-26 19:12:34 +0100

Seen: 797 times

Last updated: Apr 01 '14