A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Hide #Name? until find record



 
 
Thread Tools Display Modes
  #1  
Old November 1st, 2008, 02:01 PM posted to microsoft.public.access.forms
Song Su
external usenet poster
 
Posts: 165
Default Hide #Name? until find record

I have a SearchForm with subform. I don't want to display any record until
user find the record through cbobox and I will provide RecordSource with
where condition in my code just display that one record. So in the design
view, I deleted SecordSource in data tab. When I open the form, there is no
record, that's good. However, all the fields in my SearchForm display
'#Name?' which does not look good.

How to hide these #Name?


  #2  
Old November 1st, 2008, 03:32 PM posted to microsoft.public.access.forms
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default Hide #Name? until find record

I assume you're saying that the "#Name?" is showing in the subform's record?
That suggests that you have no RecordSource for the subform when you first
open the form and that the bound controls can't associate to the right
fields?

If yes, use a RecordSource that includes the correct fields, but also use a
WHERE clause that won't return any reords, for the initial RecordSource that
your search code can replace, such as:

SELECT * FROM Tablename
WHERE 1=0;

Or, alternatively, make the subform invisible until you've set its
RecordSouece, then make it visible.
--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/


"Song Su" wrote in message
...
I have a SearchForm with subform. I don't want to display any record until
user find the record through cbobox and I will provide RecordSource with
where condition in my code just display that one record. So in the design
view, I deleted SecordSource in data tab. When I open the form, there is no
record, that's good. However, all the fields in my SearchForm display
'#Name?' which does not look good.

How to hide these #Name?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:33 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.