Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access 2007 default field in subform

Posted on 2011-02-22
2
Medium Priority
?
298 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

885 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