The code posted here by myself and PHV (his second code) are valid and both test out OK for me."
And they work for me, now.
Some where as I ran different pieces there was a value in my Default Value field. I took that out and both codes work. Not sure how it got there. Sorry. Thanks all for...
No further progress
Title Bar follows:
Microsoft Visual Basic - Forms -[Form Personal Data(Code)]
Option Compare Database
________________________________________________________
strCity AfterUpdate
Private Sub strCity_AfterUpdate()
If Not IsNull(Me.strCity.Value) Then...
Title Bar follows:
Microsoft Visual Basic - Forms -[Form Personal Data(Code)]
Option Compare Database
________________________________________________________
strCity AfterUpdate
Private Sub strCity_AfterUpdate()
Me.strCity.DefaultValue = Me.strCity.Value
End Sub
When I go...
In the property sheet for strCity, in the After Update, I have the following:
Me.strCity.DefaultValue = Me.strCity.Value
I then want to go to a new record in form and have the city field populated with the city from the previous record.
It did not work for me. What am I missing.
A day in...
I am trying to write an expression in a default value for a field to make it equal the Previous Records field value. Can this be done and how, because I'm not getting it. Thanks for any help.
A day in November is worth 5 in October
Golom, As talking here we decided the two sides of the aurgument could NOT be different datatypes. The Cstr fixed it and it works.
Thank You all. It is done!
"I'm just glad I had my bow in hand, from the time I saw him till he was down was about 45 seconds!" Nov. 1st 157 7/8 Typ
PH
I put in 999 instead of "No Dates Entered" and you are correct, in that it now returns 999 when there are no dates.
WHY does that matter if it a literal field or number?
It doesn't matter when the IIF is in two statements as I stated in earlier post.
Is there a solution then for the...
YES
I can break the IIF into to separate fields and it works.
Days Rec to Issue: IIf([issue_date] Is Not Null,[Date Info Rec]-[issue_date],"No Issue Date Entered")
Days Rec to Reject: IIf([reject_date] Is Not Null,[Date Info Rec]-[reject_date],"No Reject Date Entered")
I have a field I gave...
Same exact error, below (what you sent) returns field value of #error
IIf(Not IsNull([issue_date]), [Date Info Rec]-[issue_date],
IIf(Not IsNull([reject_date]), [Date Info Rec]-[reject_date], "No Dates Entered"))
But Below returns a value of No Dates Entered, Just by putting the quotes around...
This works.
Bingo: IIf([LicenseType]="7","Yes",
IIf([LicenseType]="8","Yes","No"))
This does NOT, returns #error for the field value.
Days Rec to Issue or Reject:
IIf([issue_date] Is Not Null,[Date Info Rec]-[issue_date],
IIf([reject_date] Is Not Null,[Date Info Rec]-[reject_date],"No Dates...
I didn't get it at first but it got me going in the right direction and here is what works.
--------------------------------------------------
'MODULE 1
Option Compare Database
Public GlobalIndSalesdistrict As String
Public Function GetGlobalIndSalesdistict() As String
GetGlobalIndSalesdistict...
Setup
From Form1 user picks YRQTR from drop down
and picks another YRQTR from drop down (for comparison)
and picks Region from Drop Down
and then user used to pick a salesdistrict
Then would go to another form for the type of report to run.
With 40 sales districts it took a long time to run...
Thanks. Documented the info for future reference.
"I'm just glad I had my bow in hand, from the time I saw him till he was down was about 45 seconds!" Nov. 1st 157 7/8 Typ
I have a problem when I am mail merging an Access table to a word document. The problem is that one of the fields I am merging is an OLE object. (it contains a bitmap image) When merging the fields (customer name, address, etc) no problems but when merging the OLE field all that shows up is...
Thanks Blorf. I did this, not sure how efficient it is but...
I went to the query design and clicked on the Totals button. Which put a Group By row agross my fields. I didn't use the row as far as summing or averaging.
Ran the query and tried to change a record and message says recordset...
I am thinking maybe this can't be done.
I have a single table query that when it is run, I want the data to be non-updatable. I have searched and can't find where you can do this. I saw where people had queries not be able to update when they wanted to be able to update. I have went through...
I got it with the least amount of data conversion. Actually I did not use any data conversion. I used JonFer's suggestion of
>=Date()-1 and <Date() ' on or after midnight prior day and less than midnight current day
I'm not sure what I did wrong the first time I said I could not get it to...
Thanks all. I used a variation of the format you all suggested. Which formats to short date. Which is 2 in the FormatDateTime function.
Date Only: FormatDateTime([Changed Record Date Time],2)
in the citeria I used Date() -1
I had to create the field Date Only in this query.
But
If I could...
If the record gets changed I populate a field with the =now() function using the BeforeUpdate. User wants both date and time. The field only displays the date but the time is included. Works fine. Now they also want a nightly report that shows all records changed or created for the day. Here...
I put the same code on BeforeUpdate and everything works fine. AfterUpdate was continuing to fire because the changed fields would change each time I tried to leave the record. Sorry to bother everyone. Thanks for all the help in the past. :)
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.