Ok, so here's my code:
strSQL = "Update tblMasterNames Set FirstUse =#" & Format(Me.boxWeekBegins.Value, "yyyy/mm/dd") & "# Where FirstUse Is Null and MasterName=" & working.Master1.Value
'strSQL1 =
DoCmd.RunSQL strSQL
boxWeekBegins is the text box on the form,
MasterName is a field...
Thanks for the suggestion, Remou.
I'm using
'Field 1 is a date
strSQL="Update tblTable Set Field1=#" & Format(Me.txtField1,"yyyy/mm/dd") & "# Where Field1 Is Null And ID= " & Me.txtIDNumber
DoCmd.RunSQL strSQL
and it keeps breaking at DoCmd, saying that the variable is not defined... I'm not...
Hi,
I'm trying to write a code that:
1- Uses DLookup to find a value based on a criteria (which happens to be the primary key)
2- Check if this value is null, and
3- If it is, insert a value into a table from a textbox on a form.
The thing is, the table is already created, so I'm not adding...
Hi Skip,
Thanks for the input- I did want to represent the string, because it was the durations of two things that I wanted to put in the column.
PHV solved the problem for me.
Hi,
I attached a report to a query that has selection criteria, so that when you open the report, it prompts you to enter in values (ex. a month). I followed the steps in Access Help ("Use a form to enter report criteria").
Everything works fine, but the system now pops up its own message box...
Hi,
I'm trying to concatenate two Time fields in a query. Sometimes the second field will be null, so I wrote:
(the lengths are associated with a MasterName)
Duration: Format([tblMasterNames.Length],"Short Time") & ("/"+Format([tblMasterNames_1.Length],"Short Time"))
and in SQL...
Thank you so much, that worked perfectly!
I also have to concatenate lengths (in seconds), but I get #Error when I try this -
[tblMasterNames.Length] & (" / "+[tblMasterNames_1.Length]) AS Duration
Also, though in the table these lengths are in short time 0:30, 0:15, etc, they show up as...
Here's my SQL - Master1 and Master2 are the "Half Names" and ISCI is the Full Name. As I said before, sometimes Master2 in the ISCI table will be null, but Master1 won't. I need Master1 to show up regardless though, and right now, it only shows if Master2 is not null.
SELECT tblISCI.Master1...
I've tried that, but it doesn't work because I'd be trying to join a Null in Half2 to nothing at all in tblHalf_1. I'm not even sure if what I want is possible..
Hi,
I have three tables in a query - tblFullName, tblHalf, tblHalf_1 . tblHalf and tblHalf_1 are identical. In tblFullName, there are columns: FullName, HalfName1, HalfName2. I'm trying to link HalfName1 to its corresponding column in tblHalf, and HalfName2 to its corresponding column in...
Hello,
I made an option group ToggleFrame with 4 buttons, and wrote code so that when a button was pressed, it would change the row source of a combo box Combo1.
The problem is, I think, that the combo box is on a subform (Sub_Form), while the option group is on the main form. I did it like...
Thanks MajP!
It's still frustrating that I can't get the Format->Conditional Formatting option on Access to work.
I'm choosing "Expression Is" and I need it to turn red if the Expiration date has passed.
My list box is called Event_1, its control source is called Event1, the table from which...
That wouldn't really work for my list, because I need users to be able to see expired events, in case they want to renew them.
But - do you think it's possible to include a button on the form (separate from the combo box) that you can click to change the row source for the combo box?
For...
That might be even easier, thanks MajP!
This means, though, that in the row source area of the properties box for the combobox, I need to include those other rows in the query, right? Or can column() reference directly from the original table?
Thanks for the advice. Something's still not working though -
Private Sub EVENTBOX_GotFocus()
Dim lngBlue As Long
Dim lngBlack As Long
lngBlue = RGB(0, 0, 255)
lngBlack = RGB(0, 0, 0)
If Not IsNull(Me.EVENTBOX.Column(6)) And (Me.EVENTBOX.Column(6) < Date) = True Then...
Hi,
I'm working with a combo box on a form that draws its values (EDates and Events) from a table. Currently, it stores the Event name. I would like to set it up so that if the Event has already passed ( EDate >Date() ), then the Event name turns red. Because the EDate of the event isn't the...
I'm having problems with the Me.[working subform] part...
I was just typing in the name of the subform as I'd saved it, but VBA is saying method or data member not found. This problem occurs in both the SQL code and recordset code versions. What could it be?
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.