Solved

Access 2007 default field in subform

Posted on 2011-02-22
2
259 Views
Last Modified: 2012-06-21
Hi,
   I have a subform that uses the DLookup function as a Default Value for one of its fields. It does a DLookup on a field in the main form and tries to populate based on the result. For a while it was working without any issues but seems to intermittently break.

What the field will do is generate an accurate default value before the subform has been entered while the user is still completing the main form. Then once the user enters the subform to enter records, the default value will disappear from that field and the field will be null or blank and the user will have to manually enter the value.

I'm not sure what is causing this but there is another default valued field next to the suspect one which does not use DLookup and is simply set to duplicate a field value on the main form. This default value never resets itself and works fine.

Any help will be much appreciated,
 Thank you,
 Preston
0
Comment
Question by:prophet001
2 Comments
 
LVL 31

Accepted Solution

by:
Helen_Feddema earned 500 total points
ID: 34953372
We probably need to see the database to give more specific advice, but you may want to change to getting the value through a link, or possibly a tiny subform to just yield the value (instead of DLookup).  
0
 

Author Comment

by:prophet001
ID: 34953931
Hey Helen,
 Thank you very much for your response. You inspired me to try and use a wrapper function in VBA and wrap the DLookup function. This seems to be working well right now and there's no issues so far. I am going to go ahead and say that this is the solution. :)
Thank you again,
 Preston
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Send a .ZPL file to a network printer from Access 8 53
bind Combobox 4 29
Search Form not Querying 2 11
Access coding 2 13
It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now