for the life of my i can not remember how to do this...
A co-worker asked me that when he makes a form based off of a table when he opens the form there is data from the table showing on the form. He would like the form to be blank when it is opened ( he wants no data to appear) because this it is a search form.
lol someone please refresh my memory on this
thank you in advance!
12 5172
This should do it! - Private Sub Form_Load()
-
DoCmd.GoToRecord , , acNewRec
-
End Sub
Linq ;0)>
Isn't there something in the properties i can change....
Here is a better example of what he wants to do...
He has a form he uses to search the database with, one of his feilds is Description
When the form is opened, there is already text in the description box ( it is the 1st record of the description feild in the table that the form is based off of)
I thought there was a property for the text box on the form that you could set where the box will start out blank until someone searches for something.
hopefully i didn't confuse you :}
You can set the Data Entry property of the form to "Yes". This will bring the form up blank until searched.
Brad.
You can set the Data Entry property of the form to "Yes". This will bring the form up blank until searched.
Brad.
Awsome thanks much!!!!!!!!!!!!!!!!!!!!!!!!!!1
If you set the Data Entry Property to Yes you'll get a blank record, but that's all you can do with the form, data entry! You'll get an error 3021, "No current record" when you try to retrieve a record!
Linq is definately right. I was able to get it to work on a form that was using Allen Browne's FindAsUType module, but that is a different set-up all together.
Brad.
Could be wrong here, so a few questions first. Is this a single form? Is he trying to look up the values with a text box?
If yes to both, try changing the text box to combo box (or creating a new one using the builtin wizards)...
Regards,
Scott
That's not the question, Scott. The question was how could he have a form with all the controls blank when the form first opens. Doesn't matter whether the search is done with a combobox (my preference) or a textbox and a command button, Data Entry set to Yes won't work! It won't allow an existing record to be retrieved into the form.
Linq ;0)>
Sorry, Linq. I wasn't thinking of the Data Entry setting. I agree that if it's set to Yes, it won't allow record retrieval.
I was meaning that for his search control, a combo box doesn't show any initial value when the form is opened. That doesn't really address the issue either, as you pointed out, of not showing any records at all on the form.
Regards,
Scott
The only way to do this is to have the form unbound when opened and set the record source after the search parameters have been entered.
However, to be honest I don't think the same form should be used as the search form. Create a form to enter the search parameters and then open the form to this particular record.
Thank you guys for all your help!! We accomplished what he was looking to do, with your help of course :)
Glad we all could help!
Linq ;0)> Sign in to post your reply or Sign up for a free account.
Similar topics
by: Batezz |
last post by:
I have created a form (below)
How do I stop it redirecting to another page (productsearchresults.php) when
form is submitted if both the fields are blank?
Any help appreciated.
Batezz
|
by: dmcconkey |
last post by:
Hi folks,
I have a client with four websites. Each site has a contact form that
is identical. They all have "required" fields validated through a
JavaScript onSubmit() function. Upon validation,...
|
by: HartSA |
last post by:
Here is the relevent part of my code. I am trying to learn ASP.
<body>
<table border="0" cellspacing="0" cellpadding="0">
<form name="frmSearch1a" method="get">
<tr>
<td align=center>...
|
by: Andy |
last post by:
Hello,
I am having many problems with setting up a parameter query that
searches by the criteria entered or returns all records if nothing is
entered.
I have designed an unbound form with 3...
|
by: visionstate |
last post by:
Hi there,
I have a form which has 2 text boxes, a combo box and a sub form in it
(which reads from a query. The query reads from the table).
On load, I would like the fields in the text boxes and...
|
by: kev |
last post by:
Hi Folks,
I have created a search query in which it successfully returns correct
results. When there are no records returned, instead of giving out a
blank form i created a pop-up msg which is...
|
by: peridian |
last post by:
Hi,
I wanted a web page where I could post code to, and have it appear in coloured formatting based on the context of the code.
Most of the techniques I have seen for this involve complex use...
|
by: KiwiGenie |
last post by:
I have an unbound form with text and combo boxes for entering search criteria . When Search button is clicked it builds a sql statement and assigns it to the recordsource of a subform.
The subform...
|
by: cssExp |
last post by:
hello,
Rather than going on a wild explanation on what's the the problem, it'll be much quicker and easier if i let you look at it yourself, so I'll post my page source (actual contents taken out,...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
| |