Re-naming Prompt (1 Viewer)

Kill_Switch

Go Easy I'm New
Local time
Today, 00:21
Joined
Apr 23, 2009
Messages
58
Hi all, as seen by the screen the prompt is looking for the CustomerControlNumber from a table.
screen.JPG
Now is there a way to have the prompt read "Enter your Customer Control Number" instead of "Form!SupplyData-Input!CustomerControlNumber"
 

SOS

Registered Lunatic
Local time
, 20:21
Joined
Aug 27, 2008
Messages
3,514
What it is currently doing is that it can't find that control on that form because you've spelled something wrong or the form isn't open.

I would use the form as input but if you must, change the query's criteria to
[Enter your Customer Control Number]
including the square brackets.
 

Kill_Switch

Go Easy I'm New
Local time
Today, 00:21
Joined
Apr 23, 2009
Messages
58
What it is currently doing is that it can't find that control on that form because you've spelled something wrong or the form isn't open.

I would use the form as input but if you must, change the query's criteria to
[Enter your Customer Control Number]
including the square brackets.
I'll give that a shot and see if it will work, sad part is it'll ahve to wait till monday, as I don't have a working printer atm.


Also what reason does the ! server in the criteria? I know I want it to use the control number as the means on knowing which table entry to print.
"[Form]![SupplyData-Input]![CustomerControlNumber]
 

SOS

Registered Lunatic
Local time
, 20:21
Joined
Aug 27, 2008
Messages
3,514
First of all it should be [Forms]! not [Form]!

And the Bang, as it is called, is the thing that tells Access that you just changed from one thing to another. For example, [Forms]! part is the forms collection - then [SupplyData-Input]! would be your form name and last [CustomerControlNumber] would be your control
 

Kill_Switch

Go Easy I'm New
Local time
Today, 00:21
Joined
Apr 23, 2009
Messages
58
First of all it should be [Forms]! not [Form]!

And the Bang, as it is called, is the thing that tells Access that you just changed from one thing to another. For example, [Forms]! part is the forms collection - then [SupplyData-Input]! would be your form name and last [CustomerControlNumber] would be your control
Ya I know it should be "Forms" I was going off the top of my head.

Thanks for explaining that, but why would the previous creator have such code?

Only reason I can think of is that he wanted the query to use the CustomerControlNumber as his reference when he wanted to view/print a form/report in which it works great when I make it call up any item ordered or rx'd.

Added +rep, thanks SOS
 
Last edited:

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 04:21
Joined
Sep 12, 2006
Messages
15,729
[Form]![SupplyData-Input]![CustomerControlNumber]

you would use the forms! syntax to make it easier to use.

YOU are doing this by opening the query directly, and requesting the data in an input box. The customernumber may be a "non-obvious" account number, which you are forcing the user to know- how does he find this?

instead, if you have a form (in this case - SupplyData-Input)
with a field called CustomerControlNumber

and no doubt a commandbutton called "Go" or something similar.


The go button calls code to open the query. Instead of prompting you for a code you may not know, the query gets the customercode by using the controlnumber field on the form.

Now the controlnumber on the form may actually be a combo-box, not just a numeric or text - which allows the user to pick a customer by the name he knows, but which then uses the underlying controlnumber to drive the query

see - easier, not harder.
 

Kill_Switch

Go Easy I'm New
Local time
Today, 00:21
Joined
Apr 23, 2009
Messages
58
The Customer Control Number is displayed on the form as soon as they enter the first value. (see screenshot)

ControlNumber is an auto integer generated by access and is the primary key, no duplicates allowed.

I think I got it working almost the way I want it to. Now just have to do the final trials on monday and see if it works, if so it'll be used at work as a new item/parts order database.


Untitled.jpg
 

Users who are viewing this thread

Top Bottom