I came up with a workaround. I added a field to the main form that evaluates the field with Count([field]) on the sub-form using the IsNumeric function:
=IIf(IsNumeric([subform].[Form]![field])=0,"No Records",[subform].[Form]![field] & " Records")
This works for me.
I'm using the Count function in the header of a continuous records sub-form to return the number of records. This works when there are records in the sub-form, however, if I go to a record in the main form and there aren't any records yet in the sub-form the field is displaying a blank rather...
I know there must be multiple threads on this: how do you use the system date in a VBA fuction? The following results in, "Invalid use of null."
Dim DateToday As Date
DateToday = Date
RemDayNum = DLookup("RemDays", "tlkpRemDays", "DateCal=" & DateToday)
Thank you,
Jaaret
I am attempting to create a function that will return the first workday of the week (Monday). The function I created is as follows:
Public Function Monday(DateDue As Date) As Date
Dim WDay As Integer
WDay = Weekday(DateDue)
Select Case WDay
Case WDay = 1...
I determined that the forms were corrupted and created new forms from scratch in a new database. I imported the tables and non-corrupted forms and they are working properly. I've encountered this problem before and it appears to stem from copying existing forms with underlying VBA and saving...
I unchecked the NameAutocorrect options but it did not have an effect on the problem. Closing and reopening the database caused the fields to fail and return #NAME?
Duane, as my screen shot indicates, I'm also using conditional formating to show focus. However, that only works for one subform at a time. The form has a cascade of four Master/subforms and the chevrons (triangles) remain visible as you move focus from one subform to the next so that it is...
NameAutocorrect settings currently:
Track name Autocorrect Info = Checked
Perform name Autocorrect = Checked
Log name Autocorrect = Unchecked
I concatinate the Control Source: ="► " & [StratInit] to indicate which record has the focus. I put a white rectangle object in front of the symbol so...
I've run into this bug before and would like to resolve it once and for all. I have a simple, concatinated field:
Field Name: txtStratInit
Control Source: ="► " & [StratInit]
It works correctly until I compact or close/reopen the dataabase, then it returns #Name?
If I rename the field (i.e...
I have a subform linked to a main form by AuthorID. I am attempting to unlink the form when I populate a search field. The first part of this If statement works but the Else part fails. I've tried LinkMasterFields = Null.
If IsNull(Me.txtQuoteSearch) Then...
I have a query based on a single table. If I open it up with no criteria I can (of course) update the data. However, if I add criteria based on form parameters I can no longer edit the data after the query runs. I'm not finding a reference to this on the Microsoft site. Is it not possible to...
I'm hoping someone can point me to the correct thread. I've tried the following code that I found on this site but it it errors out on the first line at "wdApp As Word.Application"
Dim wdApp As Word.Application, wdDoc As Word.Document
On Error Resume Next
Set wdApp = GetObject(...
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.