Adding Criteria on from Form Input (1 Viewer)

MaaattC

New member
Local time
Today, 12:13
Joined
Oct 21, 2021
Messages
5
Hi everyone,

Having a tough time figuring out how to add additional criteria from the input a user gives from the form.

[Forms]![Search Guests Form]![Surname]

I would like to search surnames that only begin with a starting letter from the user input.

I tried Like "[Forms]![Search Guests Form]![Surname]*" but this didn't work. I'm sure it's an easy fix but any help would be appreciated!
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:13
Joined
May 7, 2009
Messages
19,230
... Where [Surname] Like [Forms]![Search Guests Form]![Surname] & "*"
 

MaaattC

New member
Local time
Today, 12:13
Joined
Oct 21, 2021
Messages
5
... Where [Surname] Like [Forms]![Search Guests Form]![Surname] & "*"
Thank you for the help but I'm struggling to introduce it into my database.

It keeps putting Where [Surname] in the field section and the Like [Forms]![Search Guests Form]![Surname] & "*" in the criteria area

Is this normal? Sorry I'm really new to access 😅
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:13
Joined
Oct 29, 2018
Messages
21,467
Hi. Welcome to AWF!

Can you post the SQL statement for your query?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:13
Joined
May 7, 2009
Messages
19,230
go slow,
t keeps putting Where [Surname] in the field section and the Like [Forms]![Search Guests Form]![Surname] & "*
where are you trying to put this, if Query that is correct?
 

Gasman

Enthusiastic Amateur
Local time
Today, 12:13
Joined
Sep 21, 2011
Messages
14,255
Thank you for the help but I'm struggling to introduce it into my database.

It keeps putting Where [Surname] in the field section and the Like [Forms]![Search Guests Form]![Surname] & "*" in the criteria area

Is this normal? Sorry I'm really new to access 😅
That would be the way it does it.?
Have to tried to run it?
 

Users who are viewing this thread

Top Bottom