Looks like using an InputBox would be more appropriate and efficient here, no need for another form.
If you still want to use the default-calculated value when the user doesn't change, you can show the value within the InputBox dialog and ask the user whether they want to keep it as default or...
Coping the whole record over, then clearing out fields needed for new values are more code-efficient than coping specific fields because so, you'd have to declare more dummy variables and set them to the values that you want to copy...just more work but if you want it that way, sure can.
Good...
It shouldn't matter how your form pulls data from a table.
When you first open your form, is it already showing data? It must show data in order to be copied over to the next record.
Try the sample attached here.
This can be done with a simple copy-and-paste.
Let's say that all fields from the current record will be kept except "NewField" textbox when creating a new record. Place the following code into your AddNew_OnClick sub (assuming you click on a button to add new record).
DoCmd.RunCommand...
I'm not sure if that will work but see attached for my solution.
Here is the code:
Sub Auto_Open()
'Reset all counters to zero
Range("D3,H3:H102").Select
Selection.Clear
Range("H3").Select
End Sub
Sub Go_Click()
Dim Value As Integer
Dim Counter As Integer, CompareValue...
I just wonder about whether if this hijack-scenario should have been reported to the FBI for investigation or not. The name seems to be a Middle-Eastern name.
Is it just me smelling "terror"?
I do not see "acNormal" in the list below which is from Access Help.
Try acViewNormal instead.
----------------
AcView can be one of these AcView constants.
acViewDesign
acViewNormal
acViewPivotChart
acViewPivotTable
acViewPreview
Don't you need to Dim your variables: Vorm, Groep, Prijs?
Something like:
Public Function gettest(Vorm As String, Groep As String, Prijs As Whatever) As Currency
I actually was hoping for something like an "Add-In" for Office but the apps given work great and adequate enough.
Thank you for pointing it out - SKEA.
Hello to all,
Just something I hate and been frustrated about and would like to know whether it can be solved. I don't know about your PC but my mouse's wheel does not work in the Visual Basic Editor. This applies to all Office apps.
When I scroll the wheel, nothing moves. It works great...
My For-loop will do the trick.
Set an Index variable = counter when it finds a dash.
Put the Mid statement outside of the loop because once the loop finishes, the Index will be the last dash's index.
Edited:
Here are the steps: Let's use record "blahblah-need" as an example
-Use Len to find the number characters, return 13
-Use for loop to find where the "-" is,
-Set Index = counter
-Use Mid to return the data needed
FinalData = Mid(String, Index+1)
-Store FinalData
Ya beat me...
Hello to all the xperts out there,
I have a query with this criteria for Date field:
Where (([tblList].Date)>=#11/1/2005# And ([tblList].Date)<#12/1/2005#))
Is there any quick way, besides creating a form and run the query based on it, to have this criteria updated itself when it's a new...