Help on expressionin inventory form macro

Joe Z

New Member
Joined
Mar 9, 2006
Messages
44
I am attempting to build an Access Inventory file in Acces and reviewing the inventory template I downloaded. The inventory items are displayed in a combobox linked to a table; when the item is not listed a new item must be added through the inventory detail form. Here is where I need some help I decipereing the macro that is initated when opened, the lines

Condition Action Arguments
SetTempVar NewData, Mid(Nz([OpenArgs]),Instr(Nz([OpenArgs]),"=")+1
Onerror Next,
[TempVars]!
[NewData]<>"" SetValue [Item]. [TempVars]![NewData]

I don't quite understand the Instr(Nz[OpenArgs]),"="),=1. I interpret that as searching for the "=" in the string, but why would I be looking for "=" in a new item? This probably a dumb question, but it baffles me. Can anyone enlighten me on this?
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
It looks like it's looking for [NewData] which could be the new value, which isn't on the list.

I think OpenArgs has something to do with forms, specifically when opening forms.

Apparently there is an OpenArgs argument of DoCmd.OpenForm.

Apart from that I'll be honest, I don't understand what's happening either.:)

If this is meant to add the new item to the existing list I don't see how it's working.

Whenever I've had to do that it's involved appending the value to a table.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top