Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Remember Value for Later Use." Where????

Status
Not open for further replies.

Linda354

Technical User
Jan 2, 2002
59
US
I'm using the list box wizard, it asks me if I want it to "Remember a specific field value for later use." I say yes, but then I can't find anywhere in the properties where that value has been stored, what it's called, etc. I have no idea how to access this info "for later use".

I do not know Visual Basic and am trying to get through this project just as an Access user. It seems like that should be possible. If the answer to this necessitates VB, hopefully it will be simple enough that it will not assume much of any VB knowledge.
 
"Remember the value for later use" is to keep the listbox unbound until you give it a place to put the value later on. Assuming you just want to save the value being clicked on, I suggest just click on "Store that value in this field" and choosing which field you're saving the value to. Then you won't have to worry about going back to it!

If it's not what you're looking to do, then I'll need more info to help you =)
 
Thanks for answering! I don't want to put the value into a field, I want to use it to serve as a criteria in a query.

All I want to do is show a list of clients to the user, who selects the client he wants, then, in a subform, the client's first appointment sheet will pop up, and the user can navigate through the rest. I just need to be able to take that client's ID# over to the subform, which is built on a query with a critera set for the client ID#.

What syntax do I use in the query criteria? I tried entering what I thought was a valid variable, but it didn't like it. Also, in the properties for the list box, I would think a macro 'set value' "on click" would work, but I'm not getting it right.

Or is this just not the way to go about this objective?
 
When the value in the reqd control changes in control after
update u can set the control source as

Me.sbfForm.RecordSource = &quot; Select <Fields> from <Table> where <Field> = &quot; & Me.Contorl.Value (For Integer)

Me.sbfForm.RecordSource = &quot; Select <Fields> from <Table> where <Field> = '&quot; & HandleSingleQuotes(Me.Contorl.Value)& &quot;'&quot; (For Char)
 
Not sure if I can read that straight. Do the <> brackets indicate where I put in my own values and objects?
 
Yes the angled values is the your values for fields,tables and the field names?
 
Why are there two similar statements? Is one to be used in the query criteria, and the other in the update of the form?

If so, this is the best I can make of the necessary substitutions


Me.sbfForm.RecordSource = &quot; Select ID from Client Contact Information where ID = &quot; & Me.Control.Value (For Integer)

Me.sbfForm.RecordSource = &quot; Select ID from Client Contact Information where ID = '&quot; & HandleSingleQuotes(Me.Contorl.Value)& &quot;'&quot; (For Char)


I'm sure my syntax is incorrect.
 
Would it be possible to translate to English what these commands are saying?
 
Linda, Raj was trying to show you how you need to use single quotes around a text field in your SELECT statement. If ID is a TEXT field, it needs to be

Select... where ID = ' &quot; & Me.Listbox & &quot; ' ; &quot;

(extra spacing used for emphasis - you generally don't want it that way - you want '&quot; ... & &quot;';&quot;)


so you get id sent as a string. If ID is numeric, you don't need the single quotes:

Select... where ID = &quot; & me.Listbox & &quot;;&quot;

Get it now?

Jim How many of you believe in telekinesis? Raise my hand...
Another free Access forum:
More Access stuff at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top