I use the following code to stop users from entering a date on a record when that date has already been used in another record:
If Not IsNull(DLookup("[ActivityDate]", "[tblActivitySheet]", "[ActivityDate]=#" & Format([ActivityDate], "yyyy-mm-dd") & "#")) Then
MsgBox "There is already an...
...AceMan. This database, which I inherited, currently uses a query to open a form with criteria in the Firm Name as follows:
Like [Enter one or more letters of the Firm name] & "*"
But as I have found, when you type "LAW" or "L" for instance, you would get over a thousand firms when the form...
It's a customers database for the legal community and many, many lawfirms names begin with "Law Offices of." So try to locate them by sorting or using a query by name will bring up thousands oflaw firms that begin this way.
I am assuming that I am probably going to have to use some type of...
For instance...
Law offices of...etc
Dr. so and so
How would you approach sorting for search tables and combo boxes etc...
Just a programming problem that I am sure is quite normal. Thanks for any articles you may be able to point me at on this topic.
I have a subform that is datasheet view. It is activities for an order. I want users to be able to delete/edit these activities as needed accept for certain activities. Most are fine, however, if the ActivityCode is "WE" (Work Order Entered), then I dont ever want that to be edited or deleted by...
I tried playing with that a little, but I know I am not using it right...I simply did
If Me.NewRecord = True Then
Do this
Else
Exit Sub
End IF
and a couple other ways that don't work, nor did I expect them to.
How is that property used correctly for my situation?
Thank you for your help.
I need some advice here. What is the best way for Access to tell whether an updated record is a new record, or a record that I just edited.
For instance, if I am entering a new order, and after that order updates I will have Access automatically do something with part of the data...however, if...
Set the property of your subform to Enabled - NO
Then use the OnCurrent Event of your main form to put your criteria and change the Subform to Enabled = YES once the criteria has been filled.
Hope that helps
I know this has to be very simple, however, I can't figure it out. I need a command button that changes my form view from single form to continuous form. I know how to change a subform view to datasheet, but I can't figure this one out. Help please.
I didn't think of that AceMan...I like it.
Also, Remou, I would love to know a little more about what you are saying. How can I have multple pages on a form for ONE RECORD?
That would work great for data entry on this project. I could then just have a Command Button that says "continue".
Is there a way to Disable the tabs on a TabControl until my criteria has been met?
Here's what I want to do. There are a few tabs, and I want to force users to enter the data in the tab order I designate. Once the criteria is met...ie...mandatory fields are filled...then the next tab is...
Can somebody please help me with this. How can I have a message break into two lines using the Access Message Dialog Box? Some of my messages are detailed and real long:
MsgBox "Blah Blah Blah extra long message", vbCritical
I tried this without success...maybe somebody can fix this for me...
Here's what I finally got to work:
If Not (IsNull(Me.txtSuiteApt)) Then
Me.txtSuiteApt.DefaultValue = "'" & Me.txtSuiteApt.Value & "'"
Else
Me.txtSuiteApt.DefaultValue = ""
End If
If Not (IsNull(Me.txtServiceAddress)) Then...
Tried everything...this defaultValue does not like Nulls. I am going to look into a way to use DlookUp once record one is saved. Maybe a check box that says DLookUp old location info when I click "Add New Record". You've been a lot of help. I thought the Nz would work, but I get the same errors.
I tried:
Me![txtServiceCity].DefaultValue = "'" + Me![txtServiceCity] + "'"
Got this error: Invalid use of Null94
Not sure why. I am going to try the "If" method. Maybe even use DLookUp after the previous record is saved or something like that.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.