473,396 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

A97 bound controls not showing default values in form view on new record?

MLH
I have a form used for both editing and the entry of new
records named frmAdminDoListEntryForm. It has 2 fields
on it: ProjName and Rev. The form's record source is qryAdminDoList.

ProjName and Rev textbox controls both have default values.
The first is =GetProjectName() and the second is =GetCurrentRev().

There's a button on the form that runs the following:
DoCmd.GoToRecord , , A_NEWREC

I notice that the ProjName textbox shows the desired string when
I reach the new record and Rev textbox does not. If I run
? GetCurrentRev() in the immediate window, it returns the expected
string. I'm wondering why #Name? shows up in the control? Both
are bound controls. Ideas, hints, suggestions?
Nov 13 '05 #1
5 2049
When the developer has demonstrated for several weeks that he/she is
too lazy and/or too stupid to solve even very minor problems, the God
Of Access puts a curse on the application. As a result of the curse
"#Name" is frequently inserted into perfectly wonderful and superbly
crafted controls.
If you don't believe me, search the Help File, and/or
http://office.microsoft.com/en-us/as...e/default.aspx for "#Name"
and see what they say.

Nov 13 '05 #2
MLH
Your post is funny, but...
Do you know the answer?
Nov 13 '05 #3
MLH wrote:
I have a form used for both editing and the entry of new
records named frmAdminDoListEntryForm. It has 2 fields
on it: ProjName and Rev. The form's record source is qryAdminDoList.

ProjName and Rev textbox controls both have default values.
The first is =GetProjectName() and the second is =GetCurrentRev().

There's a button on the form that runs the following:
DoCmd.GoToRecord , , A_NEWREC

I notice that the ProjName textbox shows the desired string when
I reach the new record and Rev textbox does not. If I run
? GetCurrentRev() in the immediate window, it returns the expected
string. I'm wondering why #Name? shows up in the control? Both
are bound controls. Ideas, hints, suggestions?


You sure you got the "=" in on the second one?
Nov 13 '05 #4
Let's all GUESS what MLH's problem is.
Here's my GUESS: The problem has nothing to do with the Default Value
and the GetCurrentRev() function. The problem has to do with the bound
control; there's a syntax error here or the recordsource does not
include the field to which the control is (attempted to be) bound.

Nov 13 '05 #5
MLH
Good point. I dbl-checked. Yes, its there. I'm continuing this
in the later thread I retitled, FYI.

You sure you got the "=" in on the second one?


Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Paul Edwards | last post by:
I am writing in c# with Visual Studio 2003. I am creating a form that shows one record from a Dataset that is populated with only one record from SQL Server 2000. I am using bound controls, both...
2
by: Paul Edwards | last post by:
I am writing an application in c# that connects to a SQL server database. Following examples etc I can use bound controls and with the position property go to a row and edit it and save changes...
3
by: PAUL EDWARDS | last post by:
I have a windows form that is bound to a datatable. In VB6 I could just update the field contents and it would be updated in the database, however if I update the text property of the control from...
1
by: Maurice | last post by:
Hi In .NET I created a form with bound controls (Access Database). I used a dataset and followed examples to create a navigation using the Binding Context. So far everything goes well My...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
4
by: gj | last post by:
Hi, I'm trying to update a sql database from a web form using text boxes. I'm trying to learn C# on my own so I am at a complete loss. I created my sql connection, data adapter, dataset and data...
4
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
1
by: Bill | last post by:
Problem: Combo box data disappears from view when a requery is done See "Background" below for details on tables, forms & controls On a form, I want to use the setting of bound combo box C1...
1
by: MLH | last post by:
I have a form used as a subform on frmCreateInvoice. It is displayed in datasheet view in the subform control. It displays a few text fields, a boolean field (shown as a checkbox control) and a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
1
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.